From: Linus Torvalds Date: Mon, 12 Sep 2005 20:21:13 GMT Subject: Re: hmm, can't we give the "root" a parent? Message-ID: In-Reply-To: <20050912195947.GA28502@vrfy.org> On Mon, 12 Sep 2005, Kay Sievers wrote: > > And good to know about that, need to fix the "parent" link in gitweb to > respect grafts. Note that the simplest way to do this is to try to use "git-rev-list" as much as possible. The "--parents" flag makes the output have the parents (automatically _including_ any grafts) on the line that contains the commit ID. That's especially true of any tools that use git-rev-list anyway for other reasons. Eg "gitk" could parse the parent stuff this way, and didn't need to know about the info/grafts file at all. I suspect the same should be true of gitweb. (So instead of trying to parse the parent info from the header of the commit, just do "git-rev-list --pretty --parents" and parse that). Linus