git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Albert Krawczyk <albert@burgmann.anu.edu.au>
Cc: Linus Torvalds <torvalds@linux-foundation.org>, git@vger.kernel.org
Subject: Re: Git log follow question
Date: Fri, 14 May 2010 00:37:04 -0400	[thread overview]
Message-ID: <20100514043704.GC6075@coredump.intra.peff.net> (raw)
In-Reply-To: <006d01caf300$703e96a0$50bbc3e0$@burgmann.anu.edu.au>

On Fri, May 14, 2010 at 10:57:34AM +1000, Albert Krawczyk wrote:

> I'm having an issue understanding the way git log --follow works with git
> log --parents
>
> When I run
> git log --parents --pretty=format:Commit:%H%nParent:%P%n%n alloc.c
> I get:
> Commit:4b25d091ba53c758fae0096b8c0662371857b9d9
> Parent:100c5f3b0b27ec6617de1a785c4ff481e92636c1
>
> [...]
>
> When I try to run git log --parents --follow I get this:
> git log --parents --follow --pretty=format:Commit:%H%nParent:%P%n%n alloc.c
>
> Commit:4b25d091ba53c758fae0096b8c0662371857b9d9
> Parent:75b44066f3ed7cde238cdea1f0bf9e2f1744c820

Hmm. The actual parent is 75b44066. You get 100c5f in the first case
because basic revision path-limiting simplifies the history graph to
remove uninteresting commits (and rewrites the parents).

So the answer isn't _wrong_ exactly, but it is less useful. Seeing the
simplified graph is generally what we want. This is a limitation of the
way --follow is implemented. It turns off history pruning because our
list of what to prune will be changing over time.

Probably we would have to special-case the FOLLOW_RENAMES code to
rewrite the parent list before display.

I'm cc'ing Linus, who has more of a clue in both of those areas than I
do.

-Peff

  parent reply	other threads:[~2010-05-14  4:37 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-14  0:57 Git log follow question Albert Krawczyk
2010-05-14  4:16 ` Bo Yang
2010-05-14  4:37 ` Jeff King [this message]
2010-05-14 14:50   ` Linus Torvalds
2010-05-14 15:19     ` Martin Langhoff
2010-05-14 15:29       ` Linus Torvalds
     [not found]       ` <22729_1273851106_4BED6CE2_22729_6897_1_alpine.LFD.2.00.1005140827250.3711@i5.linux-foundation.org>
2010-05-14 22:39         ` Albert Krawczyk
2010-05-25  9:31     ` Jeff King
2010-05-25 18:49       ` Linus Torvalds
2010-05-26  5:58         ` Jeff King
2010-05-26 14:40           ` Linus Torvalds
     [not found] ` <21464_1273811837_4BECD37D_21464_745_1_20100514043704.GC6075@coredump.intra.peff.net>
2010-05-14  4:43   ` Albert Krawczyk

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=20100514043704.GC6075@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=albert@burgmann.anu.edu.au \
    --cc=git@vger.kernel.org \
    --cc=torvalds@linux-foundation.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).