From: Bo Yang Date: Fri, 14 May 2010 04:16:13 GMT Subject: Re: Git log follow question Message-ID: In-Reply-To: <006d01caf300$703e96a0$50bbc3e0$@burgmann.anu.edu.au> Hi Albert, On Fri, May 14, 2010 at 8:57 AM, Albert Krawczyk 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