Skip to content

Commit e54a1bd

Browse files
committed
git-gui: Ignore 'No newline at end of file' marker line.
If one or both versions of the file don't have a newline at the end of the file we get a line telling us so in the diff output. This shouldn't be tagged, nor should it generate a warning about not being tagged. Signed-off-by: Shawn O. Pearce <[email protected]>
1 parent 75e78c8 commit e54a1bd

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

git-gui.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -706,6 +706,7 @@ proc read_diff {fd} {
706706
|| [string match {mode *} $line]
707707
|| [string match {new file *} $line]
708708
|| [string match {deleted file *} $line]
709+
|| $line eq {\ No newline at end of file}
709710
|| [regexp {^\* Unmerged path } $line]} {
710711
set tags {}
711712
} elseif {$is_3way_diff} {

0 commit comments

Comments
 (0)