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

Re: [PATCH/Test] Build in merge is broken

From
Miklos Vajna <vmiklos@frugalware.org>
Date
Jul 13, 2008, 18:43 UTC
Message-ID
<20080713184300.GF10347@genesis.frugalware.org>
In-Reply-To
<20080713174659.GE10347@genesis.frugalware.org>
On Sun, Jul 13, 2008 at 07:46:59PM +0200, Miklos Vajna <vmiklos@frugalware.org> wrote:
> So far what I see is that the input for the reduce_heads() function is
> (c1, c0, c2, c0, c1). The expected output would be (c1, c2), but the
> actual output is c2. So I suspect the bug is not in builtin-merge.c
> itself but in reduce_heads().

This fixes the problem for me. Junio, does the fix looks correct to you as well?

Thanks.
diff --git a/commit.c b/commit.c
index d20b14e..03e73f3 100644
--- a/commit.c
+++ b/commit.c
@@ -747,7 +747,7 @@ struct commit_list *reduce_heads(struct commit_list *heads)
 
 		num_other = 0;
 		for (q = heads; q; q = q->next) {
-			if (p == q)
+			if (p->item == q->item)
 				continue;
 			other[num_other++] = q->item;
 		}
Previous: Miklos VajnaNext: Junio C Hamano
Message 4 of 7 in “Build in merge is broken”
  1. Build in merge is brokenSverre Hvammen Johansen, Jul 13, 2008
  2. Miklos VajnaJul 13, 2008
  3. Miklos VajnaJul 13, 2008
  4. Miklos VajnaJul 13, 2008
  5. Junio C HamanoJul 13, 2008
  6. Sverre Hvammen JohansenJul 14, 2008
  7. Junio C HamanoJul 14, 2008

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.