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

Re: [PATCH] Keep rename/rename conflicts of intermediate merges while doing recursive merge

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
Mar 31, 2007, 16:07 UTC
Message-ID
<Pine.LNX.4.64.0703310856070.6730@woody.linux-foundation.org>
In-Reply-To
<20070331114938.GB4377@steel.home>
On Sat, 31 Mar 2007, Alex Riesen wrote:
> 
> The result seem to be at least predictable. Still, doesn't it mean
> that once a rename/rename conflict is in it has to be resolved
> manually forever?

No. It means that that particular rename/rename conflict has to be resolved *once*, since after that, the new merge will become the merge-base for future merges.

Now, that doesn't mean that you may not end up having that same conflict show up over and over again, because the new merge-base may (obviously) end up being a situation where the rename/rename conflict will continue to exist later on (because it conflicts with what the repo you pulled from will continue to have), but that's really no different from any other conflict..

The only way to resolve some conflicts in the long run is to either 
 - converge on some common case (ie normally by merging both ways 
   eventually, or just try to converge otherwise)
 - remember the conflict resolution and re-doing it automatically (ie 
   "git rerere" for rename conflicts)

That's very fundamental, btw. I don't think there *is* any other way to do automatic merges in the long run, it has nothing to do with this particular issue, it's a generic property of automatic merging.

Junio - I think Alex' patch is better than what we have right now (which is dying - whether with a SIGSEGV or a die() doesn't much matter), so it should be applied. It probably isn't perfect, and I bet we can tweak the resolution to something much better - Dscho seems to have ideas in that areas. But:

	Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
in the meantime.

One thing we could/probably should do is to perhaps just add a flag about "intermediate merges had complex issues", and refuse to commit the result even if it looked "clean" in the end. It's better to make people perhaps have to do an "unnecessary" extra git-commit, than to silently commit something that might have been mis-merged. Just ask people to "please verify the end result" kind of thing..

		Linus
Previous: Johannes SchindelinNext: Alex Riesen
Message 27 of 31 in “SEGV in git-merge recursive:”
  1. Tom PrinceMar 29, 2007
  2. Alex RiesenMar 29, 2007
  3. Tom PrinceMar 29, 2007
  4. Alex RiesenMar 29, 2007
  5. Tom PrinceMar 29, 2007
  6. Alex RiesenMar 29, 2007
  7. Tom PrinceMar 29, 2007
  8. Alex RiesenMar 29, 2007
  9. Alex RiesenMar 29, 2007
  10. Tom PrinceMar 29, 2007
  11. Alex RiesenMar 29, 2007
  12. Alex RiesenMar 29, 2007
  13. Alex RiesenMar 29, 2007
  14. An attempt to resolve a rename/rename conflict in recursive mergeAlex Riesen, Mar 29, 2007
  15. Alex RiesenMar 29, 2007
  16. Linus TorvaldsMar 29, 2007
  17. Linus TorvaldsMar 29, 2007
  18. Alex RiesenMar 29, 2007
  19. Johannes SchindelinMar 30, 2007
  20. Linus TorvaldsMar 31, 2007
  21. Linus TorvaldsMar 31, 2007
  22. Alex RiesenMar 31, 2007
  23. Keep rename/rename conflicts of intermediate merges while doing recursive mergeAlex Riesen, Mar 31, 2007
  24. Jakub NarebskiMar 31, 2007
  25. Johannes SchindelinMar 31, 2007
  26. Johannes SchindelinMar 31, 2007
  27. Linus TorvaldsMar 31, 2007
  28. Alex RiesenMar 31, 2007
  29. Junio C HamanoMar 31, 2007
  30. Johannes SchindelinMar 31, 2007
  31. Tom PrinceMar 29, 2007

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.