RE: Git log follow question
From: Albert Krawczyk <hidden>
Date: 2016-06-15 22:48:48
Bo and Peff, Thank you very much for your explanation. Linus, thanks in advance for looking at this. Regards, Albert -----Original Message----- From: git-owner@vger.kernel.org [mailto:git-owner@vger.kernel.org] On Behalf Of Jeff King Sent: Friday, 14 May 2010 2:37 PM To: Albert Krawczyk Cc: Linus Torvalds; git@vger.kernel.org Subject: Re: Git log follow question 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 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html