From: James Blackburn <jamesblackburn@gmail.com>
To: Jeff King <peff@peff.net>
Cc: Junio C Hamano <gitster@pobox.com>,
Jakub Narebski <jnareb@gmail.com>,
git@vger.kernel.org
Subject: Re: git log --follow doesn't follow a rename over a merge
Date: Thu, 16 Jun 2011 20:41:14 +0100 [thread overview]
Message-ID: <BANLkTin19sx9_+VKwD5TSxxJjHMZT-JoYQ@mail.gmail.com> (raw)
In-Reply-To: <20110616181509.GA12689@sigill.intra.peff.net>
On 16 June 2011 19:15, Jeff King <peff@peff.net> wrote:
> This test case shows full-history helping:
This test shows what I've done:
commit() {
echo $1 >>$1 && git add $1 && git commit -m $1
}
git init repo
cd repo
commit one
commit two
commit three
git symbolic-ref HEAD refs/heads/newroot
rm *
git rm --cached *
commit four
commit four
commit four
commit four
commit four
commit four
commit five
git checkout master
git merge --no-commit newroot
git mv four four2
commit six
commit four2
commit five
git log --graph --oneline
* 7c4c441 five
* 02a7262 four2
* 6ac2fe0 six
|\
| * d4f5e35 five
| * 350d3e9 four
| * b975d48 four
| * 3bdbf38 four
| * 5b58da8 four
| * 9fb4f59 four
| * a6d1492 four
* b301c9c three
* 38865e2 two
* 9a9c689 one
At this point, only git-blame seems correct:
> git blame -- four2
Correct
> git log --oneline -- four2
02a7262 four2
6ac2fe0 six
> git log --follow --oneline -- four2
02a7262 four2
>From the above: I can't log past four2 (without using blame-log.sh).
> git log -- four
<no output>
> git log --follow --oneline -- four
350d3e9 four
b975d48 four
3bdbf38 four
5b58da8 four
9fb4f59 four
a6d1492 four
>From above: I can't log four without doing '--follow', and the output
is missing the deletion in the merge commit.
Log of 'five', which hasn't been renamed, looks ok.
James
next prev parent reply other threads:[~2011-06-16 19:41 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-15 22:41 git log --follow doesn't follow a rename over a merge James Blackburn
2011-06-16 13:25 ` Jakub Narebski
2011-06-16 13:31 ` James Blackburn
2011-06-16 17:01 ` James Blackburn
2011-06-16 17:45 ` Jeff King
2011-06-16 17:34 ` Jeff King
2011-06-16 17:59 ` Junio C Hamano
2011-06-16 18:15 ` Jeff King
2011-06-16 19:41 ` James Blackburn [this message]
2011-06-16 18:41 ` James Blackburn
2011-06-16 19:36 ` Junio C Hamano
2011-06-16 21:29 ` James Blackburn
2011-06-16 22:14 ` James Blackburn
2011-06-16 18:21 ` James Blackburn
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=BANLkTin19sx9_+VKwD5TSxxJjHMZT-JoYQ@mail.gmail.com \
--to=jamesblackburn@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jnareb@gmail.com \
--cc=peff@peff.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).