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

Re: [PATCH] Use diff3 instead of merge in merge-recursive.

From
Linus Torvalds <torvalds@osdl.org>
Date
Oct 18, 2006, 15:53 UTC
Message-ID
<Pine.LNX.4.64.0610180835000.3962@g5.osdl.org>
In-Reply-To
<eh4sfr$3ej$1@sea.gmane.org>
On Wed, 18 Oct 2006, Jakub Narebski wrote:
> 
> Doesn't xdiff library git uses have diff3/merge equivalent?

Nope. It has something it calls "merge", but it's really just "apply the diff from the common base to the other end".

IOW, if "a" is your common ancestor, and "b1" and "b2" are the branches, it's literally

	diff a b1 | patch b2
and not actually a real 3-way merge.

As to why git uses "merge" - I have this strong memory of having seen machines that had one but not the other, and that, along with the fact that I've used "merge" personally, is why we call "merge" rather than diff3.

In Linux systems, "merge" usually comes with the RCS package, and "diff3" is usually from "diffutils". It may be that "diff3" is more common. I'm not sure what the history is, and what the situation would tend to be like on other systems..

		Linus
Previous: Johannes SchindelinNext: Daniel Barkalow
Message 4 of 8 in “Use diff3 instead of merge in merge-recursive.”
  1. Use diff3 instead of merge in merge-recursive.Uwe Zeisberger, Oct 18, 2006
  2. Jakub NarebskiOct 18, 2006
  3. Johannes SchindelinOct 18, 2006
  4. Linus TorvaldsOct 18, 2006
  5. Daniel BarkalowOct 19, 2006
  6. Johannes SchindelinOct 18, 2006
  7. Uwe ZeisbergerOct 20, 2006
  8. Johannes SchindelinOct 21, 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.