From: Jeff King <peff@peff.net>
To: James Blackburn <jamesblackburn@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: git log --follow doesn't follow a rename over a merge
Date: Thu, 16 Jun 2011 13:45:54 -0400 [thread overview]
Message-ID: <20110616174554.GC6584@sigill.intra.peff.net> (raw)
In-Reply-To: <BANLkTi=4S08h=uMV5oo7S9qpruMot2kVfg@mail.gmail.com>
On Thu, Jun 16, 2011 at 06:01:25PM +0100, James Blackburn wrote:
> I see a lot of this has been discussed before... but just to add that
> Jeff's blame-log.sh:
> http://git.661346.n2.nabble.com/alternate-log-follow-idea-td1385917.html
> seems to work and show the full history of the file past the rename+merge!
You may want to also check out the "line-level history browser" work by
Bo Yang and Thomas Rast, which is a similar idea, but done much better.
You can find it here:
http://repo.or.cz/w/git/trast.git/shortlog/refs/heads/line-log-cleanup
or pull it with:
git pull git://repo.or.cz/git/trast.git line-log-cleanup
Use on a whole file is something like:
git log -L '1,$':yourfile
But note that it is a work in progress, and I seem to be able to get it
to segfault on some simple tests.
> I was also interested in whether there's a better way of re-connecting
> history than grafting one repository's history into the commit which
> made it visible in another? AFAICS the graft is no different to a
> merge commit which contains a rename in the merged node, so I'm
> guessing this is a reasonable thing to do?
Usually you would graft the tip of the old history to the root commit of
the new history. So it's not a merge, but makes it look like a
contiguous linear history near the graft. But that's only a
per-repository thing. If you want to join two histories in the actual
history graph, you would merge them; if one supersedes the other, then
you would use the "ours" merge strategy to ignore the other side.
I'm not 100% sure I understand your question. Does that answer make
sense?
-Peff
next prev parent reply other threads:[~2011-06-16 17:46 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 [this message]
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
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=20110616174554.GC6584@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=jamesblackburn@gmail.com \
/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).