From: Linus Torvalds Date: Mon, 12 Sep 2005 21:42:16 GMT Subject: Re: hmm, can't we give the "root" a parent? Message-ID: In-Reply-To: <20050912210006.GA32211@vrfy.org> On Mon, 12 Sep 2005, Kay Sievers wrote: > > Everthing that walk from one commit to another, uses git-rev-list, sure. > But in the commit view, and the commitdiff the "parent" link and the parent > that is passed to diff is read from the commit itself. > > > (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). > > I need only one parent: > git-rev-list --parents --max-count=1 Who don't you use that to show the comments too? So instead of doing git-cat-file commit (or whatever you do), just do git-rev-list --parents --pretty=raw --max-count=1 That way you don't get any extra fork/exec overhead - you get everything with one program. Linus