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

merge-recur status

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Aug 9, 2006, 21:02 UTC
Message-ID
<Pine.LNX.4.63.0608092232000.13885@wbgn013.biozentrum.uni-wuerzburg.de>
Hi,

with my last patches, I tested merge-recur on 'next' (46faaaf8) by comparing the index after -recur and -recursive, respectively.

At this stage, there are 1017 merges with exactly two parents (which is the only type of merge -recursive can handle).

For all but 9 of them, the indices where identical. The reason for those 9 to differ: the order of the merge-bases. -recursive does its own thing (set intersection after traversing the commits by hand, probably in topological order), whereas with the last patches, -recur orders them by decreasing date.

The 9 cases are:

52bc0e29: 1 better a5c8a98c: 1 better, 2 identical 63bccad3: 1 identical dcaad49c: 3 identical 7f2d5cb5: 3 identical c2b9e699: 2 identical 4cc0b8a4: 2 identical d2b9b5f5: 1 identical 41094b8e: worse

where
- "1 better" means that -recursive has a conflicting hunk, where 
  -recur resolves it (it is identical with the commit),
- "1 identical" means that there were multiply conflicting hunks (meaning 
  that merging two merge-bases already conflicted, and another conflict 
  came on top), and the versions of -recursive and -recur differ only in 
  the order of the conflict nesting, and
- "worse" means that the merge of 859ab4c and 061ad5f, which _should_ have 
  resulted in 41094b8e (as with -recursive) resulted in a
  "fatal: Entry 'epoch.c' would be overwritten by merge. Cannot merge."
  It might have its reason in the fact that 859ab4c and 061ad5f have
  8 (!) merge bases.

Now, on average, -recur takes 0.1 seconds on average, spending only 9.9% of what -recursive takes (on average). So I am happy with the speed.

I think -recur is really really close to being trustworthy, _but_ I do not understand the reason behind the error. It happens in line 614 of unpack-trees.c, where the "index" contains epoch.c, and "index" and "remote" are identical, but "head" is empty.

I tried to wrap my head over it, but seem unable to do so. Also, I do not find the case 14ALT (which is mentioned in unpack-trees.c:603) in Documentation/technical/trivial-merge.txt.

Help?

Ciao, Dscho

Next: Junio C Hamano
Message 1 of 5 in “merge-recur status”
  1. Johannes SchindelinAug 9, 2006
  2. Junio C HamanoAug 9, 2006
  3. Fredrik KuivinenAug 10, 2006
  4. Johannes SchindelinAug 10, 2006
  5. Junio C HamanoAug 10, 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.