diff --check line number bug

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



% mkdir git-ws
% cd git-ws
% git init
% touch foo
% git add foo
% printf '\n\nline 3 \n\nline 5 \nline 6\n' > foo
% cat -n foo
     1	
     2	
     3	line 3
     4	
     5	line 5
     6	line 6
% sed -ne l foo
$
$
line 3 $
$
line 5 $
line 6$
% git diff --check foo
foo:1: trailing whitespace.
+line 3
foo:2: trailing whitespace.
+line 5
% git version
git version 1.5.4.1.1281.g75df

Apparently somewhere in the bowels of the "Crazy xdl interfaces", empty
lines are skipped over, thus the line number counting in
checkdiff_consume() is off? I dunno, I briefly looked into fixing it but
it didn't seem like a quick fix.

j.
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux