google / google/git-appraise

Comment location parameters are checked after invoking editor

Open
#107 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
5.3k
Forks
148
PR merge metrics
No merged PRs in 30d

Description

In the git-appraise repo, I did

$ git appraise comment -f .travis.yml -l 10 bd714f195655

and composed a review comment in my editor. After I was done I got

Unable to comment on the given location: Line number 10 does not exist in file ".travis.yml"

This was just my off-by-one error, I should have used `-l 9`.

Unfortunately, `.git/APPRAISE_COMMENT_EDITMSG` was deleted despite the error, so I had to write it again.
I think we should either check for errors upfront, or preserve `APPRAISE_COMMENT_EDITMSG` in case of errors.

(I pushed my review to my fork, I'm not sure if that will reach the PR here?)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.