From: "Jay Soffian" <jaysoffian@gmail.com>
To: "Git Mailing List" <git@vger.kernel.org>
Subject: diff --check line number bug
Date: Fri, 15 Feb 2008 15:18:45 -0500 [thread overview]
Message-ID: <76718490802151218s62c4f884u39353b66540b347a@mail.gmail.com> (raw)
% 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.
next reply other threads:[~2008-02-15 20:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-15 20:18 Jay Soffian [this message]
2008-02-16 4:30 ` [PATCH/maint] diff: Fix miscounting of --check output Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=76718490802151218s62c4f884u39353b66540b347a@mail.gmail.com \
--to=jaysoffian@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).