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

Merging and parents

From
Matthias Urlichs <smurf@smurf.noris.de>
Date
Jul 5, 2005, 16:19 UTC
Message-ID
<pan.2005.07.05.16.19.28.957617@smurf.noris.de>
I just had this ugly merge situation:
 M
 |\
 | \
 A  B
 |\/|
 |/\|
 C  D
 | /
 |/
 E

Suppose both the EC and the ED branch add files (not with conflicting filenames!) which then get modified somewhere between C/D and M.

No matter which node gets picked as the parent, some files will end up as "created on different branches" because the chosen parent doesn't have them, even though, strictly speaking, it ain't so.

So ... what to do? Generate a list of parents, and for each file pick the one parent where it (a) exists and (b) has the smallest diff? Or just ignore (umm... OK, document) the problem?

-- 
Matthias Urlichs   |   {M:U} IT Design @ m-u-it.de   |  smurf@smurf.noris.de
Disclaimer: The quote was selected randomly. Really. | http://smurf.noris.de
 - -
I'm thankful I didn't believe in God, because it
would have been another thing for me to conquer.
		-- Kim Goldman
Next: Linus Torvalds
Message 1 of 2 in “Merging and parents”
  1. Matthias UrlichsJul 5, 2005
  2. Linus TorvaldsJul 6, 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.