Re: [PATCH] Teach parse_commit_buffer about grafting.
- From
Linus Torvalds <torvalds@osdl.org>
- Date
- Aug 18, 2005, 05:16 UTC
- Message-ID
- <Pine.LNX.4.58.0508172209220.3412@g5.osdl.org>
- In-Reply-To
- <17155.64070.264664.926461@cargo.ozlabs.ibm.com>
On Thu, 18 Aug 2005, Paul Mackerras wrote:
> > I added support for grafts to gitk just yesterday, and it should be on > kernel.org by now. I also committed the changes to send lines into > hyperspace.
Paul, I hate to tell you about yet another flag to git-rev-list, but did you realize that in addition to all the other magic flags, there's a flag called "--parents"?
Right now you use "git-rev-list --header --topo-order", which gives you both the commit ID's and the header. Add a "--parents" there, and you'll notice that the first line of each NUL-terminated record changes from just the commit ID to the "commit ID + parent list".
That way gitk wouldn't need to actually know about grafts, because it would just pick it up from the git-rev-list output which gets it from the regular commit parsing code.
Umm. git-rev-list really does everything. Rule of thumb: if you _ever_ need to look at any other internal git information, you're probably doing something wrong, or you've missed yet another flag ;)
Linus