Skip to content

Comment location parameters are checked after invoking editor #107

@krobelus

Description

@krobelus

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?)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions