From: Junio C Hamano <gitster@pobox•com>
To: "Kyle J. McKay" <mackyle@gmail•com>
Cc: Scott Schmit <i.grok@comcast•net>,
git mailing list <git@vger•kernel.org>
Subject: Re: [BUG] Move tracking in git diff is not as good as in git status
Date: Thu, 05 Feb 2015 11:01:59 -0800 [thread overview]
Message-ID: <xmqq61bgmbbs.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <099A7D2D-6033-4A16-91DD-E2288BC5C729@gmail.com> (Kyle J. McKay's message of "Wed, 4 Feb 2015 23:39:25 -0800")
"Kyle J. McKay" <mackyle@gmail•com> writes:
> On Feb 4, 2015, at 22:11, Scott Schmit wrote:
>
>> In my use of git, I've noticed that "git status" is a lot better at
>> tracking moves and renames than "git diff", and this has recently
>> caused
>> me a lot of headaches because a large number of moves were made in a
>> single commit, and it was very difficult to figure out which moves
>> were
>> right and which were wrong.
>>
>> I was using a fairly old version of git (1.7.11), but was able to
>> reproduce it on git 2.2.1.
>>
>> Here's a reproduction recipe:
> [...]
>> # Now "shift" the files
>> git mv 2 3
>> git mv 1 2
> [...]
>> git commit -m "2=1;3=2;"
>>
>> # Neither of these commands get it (but -C gets a glimmer of the
>> truth)
>> git diff -M --stat --summary HEAD~..
>> git diff -C --stat --summary HEAD~..
>
> Ah, but did you try this:
>
> git diff -B -M --stat --summary HEAD~..
Yes, since f714fb84 (Enable rewrite as well as rename detection in
git-status, 2007-12-02) "git status" internally uses "-B -M".
prev parent reply other threads:[~2015-02-05 19:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-05 6:11 [BUG] Move tracking in git diff is not as good as in git status Scott Schmit
2015-02-05 7:39 ` Kyle J. McKay
2015-02-05 19:01 ` Junio C Hamano [this message]
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=xmqq61bgmbbs.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=i.grok@comcast$(echo .)net \
--cc=mackyle@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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