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

Re: Opinions on changing add/add conflict resolution?

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 13, 2018, 05:30 UTC
Message-ID
<CAPc5daVu8vv9RdGON8JiXEO3ycDVqQ38ySzZc-cpo+AQcAKXjA@mail.gmail.com>
In-Reply-To
<CABPp-BEdh+UOCpFn5Y1_RydR==dDHWTeNtBub+pPjH_06Ub28w@mail.gmail.com>

While I do not think it is a bad idea to add an optional way to write the contents of conflicted stages out to separate files, I do not think it is a good idea to change what happens to add/add conflict by default.

Two integrators picking up a same patch that adds a file separately and allowing them to diverge before they are merged should not be all that surprising, just like two integrators picking up a same patch that changes an existing path and letting them evolve independently, so from that point of view, I do not think there is fundamental difference between edit/edit vs add/add and rename/rename conflict. The latter certainly would be much rarer, but that is because edit happens a lot more often than add.

There certainly are cases where conflicts is easier to resolve when the merged tip versions are unrelated or diverged too vastly, with or without a common merge base. As I already agreed to, it would be useful in such a case to have an option to write the conflicted stages to separate files to let an external merge tool to examine them and help you resolve them. But that is not limited to resolving vast differece between contents involved in an add/add conflict, is it? The same tool (which can be driven as a mergetool backend) would be useful in reconciling the difference between contents involved in an edit/edit conflict, no?

If anything, if rename/rename behaves differently by always writing the result out to separate files, it is that codepath whose behaviour should be fixed to match how add/add conflicts are dealt with.

Previous: Elijah NewrenNext: Elijah Newren
Message 9 of 22 in “Opinions on changing add/add conflict resolution?”
  1. Elijah NewrenMar 12, 2018
  2. Jonathan NiederMar 12, 2018
  3. Elijah NewrenMar 12, 2018
  4. Jonathan NiederMar 12, 2018
  5. Hilco WijbengaMar 12, 2018
  6. Jonathan NiederMar 12, 2018
  7. Elijah NewrenMar 13, 2018
  8. Elijah NewrenMar 13, 2018
  9. Junio C HamanoMar 13, 2018
  10. Elijah NewrenMar 13, 2018
  11. Junio C HamanoMar 13, 2018
  12. Elijah NewrenMar 13, 2018
  13. Junio C HamanoMar 13, 2018
  14. Elijah NewrenMar 13, 2018
  15. Jonathan NiederMar 13, 2018
  16. Elijah NewrenMar 13, 2018
  17. Junio C HamanoMar 13, 2018
  18. Ævar Arnfjörð BjarmasonMar 12, 2018
  19. Fwd: Opinions on changing add/add conflict resolution?Elijah Newren, Mar 13, 2018
  20. Junio C HamanoMar 13, 2018
  21. Ævar Arnfjörð BjarmasonMar 13, 2018
  22. Elijah NewrenMar 13, 2018

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.