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

Re: bogus merges

From
Linus Torvalds <torvalds@osdl.org>
Date
Sep 5, 2005, 16:01 UTC
Message-ID
<Pine.LNX.4.58.0509050853080.3568@evo.osdl.org>
In-Reply-To
<59a6e58305090507387d412b3d@mail.gmail.com>
On Mon, 5 Sep 2005, Wayne Scott wrote:
>
> A recent commit in linux-2.6 looks like this:

It hopefully shouldn't happen any more with the improved and fixed git-merge-base.

> Author: Russell King <rmk@dyn-67.arm.linux.org.uk>
> Date:   Wed Aug 31 10:12:14 2005 +0100

I suspect rmk is using cogito-0.13, and that it still has the older git-merge-base that can get confused by the date-ordering problem. And when git-merge-base gives the wrong result (not either of the commit objects it was given as an argument), then "git resolve" will do the wrong thing.

I just checked, and the _current_ git-merge-base definitely gives the right result:

	linux$ git-merge-base -a \
		6b39374a27eb4be7e9d82145ae270ba02ea90dc8 \
		194d0710e1a7fe92dcf860ddd31fded8c3103b7a
results in
	194d0710e1a7fe92dcf860ddd31fded8c3103b7a

ie it correctly notices that the second commit is the parent of the first one.

> Really 'git commit' should detect problems like this automatically and
> prevent them from getting in the tree.

Well, that would depend on having the fixed git-merge-base in the first place, which in turn would mean that such a commit wouldn't happen at all, so it's kind of circular. It's not worth fixing anywhere else, since once you fix it in git-merge-base, it just becomes a non-issue.

Hopefully we'll have a new cogito release soon, and this particular bug will be a thing of the past.

		Linus
Previous: Wayne ScottNext: Wayne Scott
Message 2 of 13 in “bogus merges”
  1. Wayne ScottSep 5, 2005
  2. Linus TorvaldsSep 5, 2005
  3. Wayne ScottSep 6, 2005
  4. Russell KingSep 11, 2005
  5. Daniel BarkalowSep 6, 2005
  6. Russell KingSep 11, 2005
  7. Daniel BarkalowSep 11, 2005
  8. Petr BaudisSep 12, 2005
  9. Russell KingSep 11, 2005
  10. Martin LanghoffSep 11, 2005
  11. A Large Angry SCMSep 11, 2005
  12. Russell KingSep 11, 2005
  13. Russell KingSep 11, 2005

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.