Open metafeather opened 8 years ago
Similarly there is no validation that the line number is within the length of the referenced file (should you accidentally add a line comment on the wrong file).
Thanks for reporting this, and I'm sorry it hit you.
I'll put together some fixes on Monday.
There are two different checks we need to put in place:
The second is required because a file and/or line might stop existing after a comment is written (if history is changed during the review), but we still want to be able to display those comments after such a thing happens.
The first issue was fixed in 6bbed27428fd, but I'm still leaving this bug open until I get the second issue addressed.
The command below falsely succeeds, even though the filename or path is invalid:
git appraise comment -f missspelled.go -m 'some message'
These comments seem to end up in the object referenced by .git/refs/notes/devtools/discuss and cause an error when listing with:
All comments, including the bad one, can be seen in the
--json
output.It would also be nice to have guidance on editing/amending comments before pushing, since naively using
git notes remove <sha>
does not appear to work(?)In the meantime I discovered that it was possible to checkout the comments into their own branch and remove the problem comment using
git rebase --interactive
: