From: Nanako Shiraishi <nanako3@lavabit.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: "Yuri D'Elia" <wavexx@users.sf.net>, git@vger.kernel.org
Subject: [Bug?] "diff -B --color" output doesn't show space errors
Date: Tue, 15 Sep 2009 12:34:56 +0900 [thread overview]
Message-ID: <20090915123456.6117@nanako3.lavabit.com> (raw)
In-Reply-To: <7viqfmsoej.fsf@alter.siamese.dyndns.org>
Quoting Junio C Hamano <gitster@pobox.com>
> By default, if the pathname that was present in the old version still
> appears in the new version, that path is not considered as a candiate
> for rename detection. Only "X used to be there but is gone" and "Y did
> not exist but appeared" are paired up and checked if they are similar.
>
> Give the command -B option, too, to break the filepair that does not
> disappear.
I wanted to try this -B option, and wrote a little test program.
While it shows correctly that the file was rewritten, it doesn't
point out various whitespace mistakes in the file anymore.
Is this a bug, or should I give some other options as well?
-- >8 -- cut here -- 8< --
git init
cat >file <<"EOF"
This is an article that will be
completely rewritten in a
later commit.
EOF
git add file
sed -e "s/T/\t/g" -e "s/_/ /g" >file <<"EOF"
An article was written but it was_
later rewritten to be_
a completely different text.
_____
An article was written but it was_
later rewritten to be_
a completely different text.
An article was written but it was_
later rewritten to be_
a completely different text.
Worse yet, the replacement text_
introduces a lot of
_Twhite space errors_
such as SP before HT and trailing
whitespaces, when the file was modified by the
later commit.
Also there are trailing empty lines at the end of the file.
EOF
git diff --color
git diff --color -B
# end of test program
--
Nanako Shiraishi
http://ivory.ap.teacup.com/nanako3/
next prev parent reply other threads:[~2009-09-15 3:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-13 11:17 rename tracking and file-name swapping Yuri D'Elia
2009-09-13 18:14 ` Junio C Hamano
2009-09-13 21:13 ` Yuri D'Elia
2009-09-14 6:44 ` Johannes Sixt
2009-09-15 3:34 ` Nanako Shiraishi [this message]
2009-09-15 4:44 ` [Bug?] "diff -B --color" output doesn't show space errors Junio C Hamano
2009-09-15 5:05 ` [PATCH] diff --whitespace: fix blank lines at end 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=20090915123456.6117@nanako3.lavabit.com \
--to=nanako3@lavabit.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=wavexx@users.sf.net \
/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).