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

Unified merge driver pushed out to "master" branch

From
Junio C Hamano <junkio@cox.net>
Date
Sep 11, 2005, 02:54 UTC
Message-ID
<7vzmqk2u1w.fsf_-_@assigned-by-dhcp.cox.net>
In-Reply-To
<20050907165012.GA20392@c165.ib.student.liu.se>

I've pushed out the 'git merge' along with Daniel's read-tree updates and your 'base on merge of bases' merge strategy driver in the "master" branch.

The last one is what I butchered your code without really auditing the changes I made, so I'd appreciate you to take a look at it and supply any necessary updates and fixes. My changes are meant to be only to adjust the calling convention to that of 'git merge' -- that is, it gets merge bases and heads from the command line, and it is not supposed to commit and update HEAD itself, but is supposed to leave its best effort in the working tree and the paths that cannot be automerged should be left as that of HEAD version in the index file, so that the user can run 'git diff' to see what is happening while resolving things by hand. I do not think my change did the last part correctlyx. The change to introduce '-i' option to read-tree is also present.

I primarily used the commits found in the Linux 2.6 repository and its derivatives that have multiple potential merge bases for my testing. Among them, the attempt to merge parents of this commit triggered an assertion failure -- it may be my fault but I have not spent much time to diagnose it.

commit 6358924b06cd1aaa031b8ba0c33e5a15e795bef0
Merge: 1da21e73bdc458f8131e6071072632b4c3b0430f 344a076110f4ecb16ea6d286b63be696604982ed
Author: Tony Luck <tony.luck@intel.com>
Date:   Thu Sep 8 14:29:32 2005 -0700
    Pull release into test branch

---------------------------------------------------------------- Here is a summary of my test results.

"Expect" names the commit being tested. The parents of each of these commits have more than one merge-base, and the test is to start from one parent of it, and merge the other parent into it using the four merge programs:

 * traditional is 'git-resolve-script' from GIT 0.99.6 (it does
   not even use Daniel's read-tree so that I can catch
   regression in read-tree).
 * dbrt is 'git-merge -s resolve', i.e. Daniel's multi-base merge.
 * stupid is 'git-merge -s stupid', supposed to be the same
   as 'git-resolve' (but internally uses Daniel's read-tree with
   only one merge base).
 * fredrik is 'git-merge -s fredrik', the one I butchered.

------------------------------------------------ Expect 0c168775709faa74c1b87f1e61046e0c51ade7f3 Method 'traditional' failed to automerge. Method 'dbrt' failed to automerge. Method 'stupid' failed to automerge. Method 'fredrik' automerged Method 'fredrik' resolved cleanly.

The fredrik is the only one that merged successfully, but its result is different from the actual commit.

:100644 100644 065b702df56353a00d5f460cf385f172decccf2b cd4222ff8b925f6b92414d58729d225fccc3f310 M	include/net/ieee80211.h

------------------------------------------------ Expect 0c3e091838f02c537ccab3b6e8180091080f7df2 (case #16) Method 'traditional' automerged Method 'traditional' resolved cleanly. Method 'dbrt' failed to automerge. Method 'stupid' automerged Method 'stupid' resolved cleanly. Method 'fredrik' automerged Method 'fredrik' resolved cleanly.

The fredrik result is different from the actual commit.
:100644 100644 a7bed60b69f9e8de9a49944e22d03fb388ae93c7 51a7b7b4dd0e7c5720683a40637cdb79a31ec4c4 M	arch/ia64/hp/sim/boot/bootloader.c

------------------------------------------------ Expect 0e396ee43e445cb7c215a98da4e76d0ce354d9d7 Method 'traditional' failed to automerge. Method 'dbrt' failed to automerge. Method 'stupid' failed to automerge. Method 'fredrik' automerged Method 'fredrik' resolved cleanly.

The fredrik is the only one that merged successfully, and its result matches the actual commit.

------------------------------------------------ Expect 1960ff70a6c1db8e5f8fa9ec7020ef585f8ce706 Method 'traditional' automerged Method 'traditional' resolved cleanly. Method 'dbrt' automerged Method 'dbrt' resolved cleanly. Method 'stupid' automerged Method 'stupid' resolved cleanly. Method 'fredrik' automerged Method 'fredrik' resolved cleanly.

All results match the actual commit.

------------------------------------------------ Expect 19925d7e0af7de645d808fd973ef99049fce52f0 Method 'traditional' automerged Method 'traditional' resolved cleanly. Method 'dbrt' automerged Method 'dbrt' resolved cleanly. Method 'stupid' automerged Method 'stupid' resolved cleanly. Method 'fredrik' automerged Method 'fredrik' resolved cleanly.

All results match the actual commit.

------------------------------------------------ Expect 3190186362466658f01b2e354e639378ce07e1a9 Method 'traditional' automerged Method 'traditional' resolved cleanly. Method 'dbrt' automerged Method 'dbrt' resolved cleanly. Method 'stupid' automerged Method 'stupid' resolved cleanly. Method 'fredrik' automerged Method 'fredrik' resolved cleanly.

All results match the actual commit.

------------------------------------------------ Expect 467ca22d3371f132ee225a5591a1ed0cd518cb3d Method 'traditional' automerged Method 'traditional' resolved cleanly. Method 'dbrt' automerged Method 'dbrt' resolved cleanly. Method 'stupid' automerged Method 'stupid' resolved cleanly. Method 'fredrik' automerged Method 'fredrik' resolved cleanly.

All results match the actual commit.

------------------------------------------------ Expect 539aeb871b52233b189ae976dfded20e14db645a Method 'traditional' automerged Method 'traditional' resolved cleanly. Method 'dbrt' automerged Method 'dbrt' resolved cleanly. Method 'stupid' automerged Method 'stupid' resolved cleanly. Method 'fredrik' automerged Method 'fredrik' resolved cleanly.

All results match the actual commit.

------------------------------------------------ Expect 6358924b06cd1aaa031b8ba0c33e5a15e795bef0 Method 'traditional' automerged Method 'traditional' resolved cleanly. Method 'dbrt' automerged Method 'dbrt' resolved cleanly. Method 'stupid' automerged Method 'stupid' resolved cleanly. Method 'fredrik' failed to automerge.

Fredrik dies on asserttion failure.

------------------------------------------------ Expect 84ffa747520edd4556b136bdfc9df9eb1673ce12 (case #16) Method 'traditional' failed to automerge. Method 'dbrt' failed to automerge. Method 'stupid' failed to automerge. Method 'fredrik' automerged Method 'fredrik' resolved cleanly.

The fredrik result matches the actual commit.

------------------------------------------------ Expect a855f9a4d29f0ec338c337358844389171b0bae0 Method 'traditional' failed to automerge. Method 'dbrt' automerged Method 'dbrt' resolved cleanly. Method 'stupid' failed to automerge. Method 'fredrik' automerged Method 'fredrik' resolved cleanly.

Both fredrik and dbrt results match the actual commit.

------------------------------------------------ Expect cf70be167c085af820c0c2a606cab8c3ee819dc6 Method 'traditional' automerged Method 'traditional' resolved cleanly. Method 'dbrt' automerged Method 'dbrt' resolved cleanly. Method 'stupid' automerged Method 'stupid' resolved cleanly. Method 'fredrik' automerged Method 'fredrik' resolved cleanly.

All results match the actual commit.

------------------------------------------------ Expect da28c12089dfcfb8695b6b555cdb8e03dda2b690 Method 'traditional' automerged Method 'traditional' resolved cleanly. Method 'dbrt' automerged Method 'dbrt' resolved cleanly. Method 'stupid' automerged Method 'stupid' resolved cleanly. Method 'fredrik' automerged Method 'fredrik' resolved cleanly.

All results match the actual commit.
------------------------------------------------
Previous: Fredrik KuivinenNext: Fredrik Kuivinen
Message 3 of 40 in “A new merge algorithm, take 3”
  1. 0/2 A new merge algorithm, take 3Fredrik Kuivinen, Sep 7, 2005
  2. 1/2 Add '-i' flag to read-tree to make it ignore whats in the working directory.Fredrik Kuivinen, Sep 7, 2005
  3. Unified merge driver pushed out to "master" branchJunio C Hamano, Sep 11, 2005
  4. Fredrik KuivinenSep 11, 2005
  5. Junio C HamanoSep 12, 2005
  6. Another merge test case from the kernel tree.Junio C Hamano, Sep 14, 2005
  7. Daniel BarkalowSep 14, 2005
  8. Junio C HamanoSep 14, 2005
  9. Fredrik KuivinenSep 14, 2005
  10. Junio C HamanoSep 14, 2005
  11. Yet another set of merge test cases from the kernel tree.Junio C Hamano, Sep 15, 2005
  12. Fredrik KuivinenSep 19, 2005
  13. Junio C HamanoSep 20, 2005
  14. Fredrik KuivinenSep 20, 2005
  15. 2/2 A new merge algorithmFredrik Kuivinen, Sep 7, 2005
  16. Daniel BarkalowSep 7, 2005
  17. Fredrik KuivinenSep 8, 2005
  18. Daniel BarkalowSep 8, 2005
  19. Fredrik KuivinenSep 8, 2005
  20. Daniel BarkalowSep 8, 2005
  21. Junio C HamanoSep 7, 2005
  22. Junio C HamanoSep 8, 2005
  23. A Large Angry SCMSep 8, 2005
  24. Chuck LeverSep 8, 2005
  25. Junio C HamanoSep 8, 2005
  26. Linus TorvaldsSep 8, 2005
  27. Junio C HamanoSep 8, 2005
  28. Chuck LeverSep 8, 2005
  29. Linus TorvaldsSep 8, 2005
  30. Chuck LeverSep 8, 2005
  31. Linus TorvaldsSep 8, 2005
  32. [RFH] Merge driverJunio C Hamano, Sep 9, 2005
  33. Daniel BarkalowSep 9, 2005
  34. Junio C HamanoSep 9, 2005
  35. Daniel BarkalowSep 9, 2005
  36. [RFH] Merge driverJunio C Hamano, Sep 11, 2005
  37. Fredrik KuivinenSep 12, 2005
  38. Junio C HamanoSep 12, 2005
  39. Fredrik KuivinenSep 13, 2005
  40. Junio C HamanoSep 13, 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.