Re: Git log follow question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Albert,
On Fri, May 14, 2010 at 8:57 AM, Albert Krawczyk
<albert@xxxxxxxxxxxxxxxxxxx> wrote:
> As you can see git log --parents and git log --follow --parents produce very
> different results, and as far as I can tell they should produce identical
> outputs.
>
> Could somebody tell me if I'm doing something wrong with the syntax? Or have
> I stumbled onto a quirk I fail to understand?

The problem you encountered is something about parent rewriting.
That's when git do a revision walk it will *modify* the actual parents
of a commit according on the command line options.
When you invoke, git log --parents , the parents rewriting mechanism
is on. Take you have five commits:
commit1 <- commit2 <- commit3 <- 4 <- 5
And only commit 5 and commit 2 change the file alloc.c. When you run
'git log --parents alloc.c', the actual parent of commit 5 will be
modified to commit2. When you run git without --parents, commit 5's
parent will still be commit 4.
And when '--follow' is given, parent rewriting mechanism will be shut
down, so you get two different output.

For another words, I don't understand why we shut down the parent
rewriting when '--follow' given. This make users confusing and also
make --graph inpossible to work with '--follow'...

Regards!
Bo
-- 
My blog: http://blog.morebits.org
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]