git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* diff --check line number bug
@ 2008-02-15 20:18 Jay Soffian
  2008-02-16  4:30 ` [PATCH/maint] diff: Fix miscounting of --check output Junio C Hamano
  0 siblings, 1 reply; 2+ messages in thread
From: Jay Soffian @ 2008-02-15 20:18 UTC (permalink / raw)
  To: Git Mailing List

% 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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-02-16  4:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-15 20:18 diff --check line number bug Jay Soffian
2008-02-16  4:30 ` [PATCH/maint] diff: Fix miscounting of --check output Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).