Re: Possible git-rev-list bug
- From
Linus Torvalds <torvalds@osdl.org>
- Date
- Jan 31, 2006, 15:55 UTC
- Message-ID
- <Pine.LNX.4.64.0601310745270.7301@g5.osdl.org>
- In-Reply-To
- <7vmzhekcz3.fsf@assigned-by-dhcp.cox.net>
On Sun, 29 Jan 2006, Junio C Hamano wrote:
Show 8 quoted lines
> Marco Costalba <mcostalba@yahoo.it> writes: > > > $ git-rev-list --max-count=1 --parents addafaf92eeb86033da91323d0d3ad7a496dae83 -- rev-list.c > > addaf.. d8f6b.. 93b74.. d8f6b.. d8f6b.. 3815f.. > > > > We have the same parent (d8f6b..) multiple times. > > I think it probably is a bug.
Well, it's not strictly a bug, and multiple of the same parents _can_ happen in real life due to buggy commits, so a tool that depends on some kind of parent uniqueness are a bit fragile. There is nothing fundamental in the git data structures that says that you couldn't have the same parent twice.
In this case, it didn't start out with the same parent - we had five unique parents, but by the time the tree had been simplified, some of them had become common.
So I don't know if it's a "bug", and the bad reaction by gitk and qgit are arguably the _real_ bugs.
But Junio's patch is simple, and perhaps the right thing to do.
Linus