git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: Junio C Hamano
Message 4 of 4 in “Possible git-rev-list bug”
  1. Marco CostalbaJan 29, 2006
  2. Junio C HamanoJan 29, 2006
  3. rev-list: omit duplicated parents.Junio C Hamano, Jan 29, 2006
  4. Linus TorvaldsJan 31, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.