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

Design issue in git merge driver interface

From
JHJoshua Hudson <jhudson@cedaron.com>
Date
Jun 22, 2023, 16:50 UTC
Message-ID
<6e1b9ce4-e86d-fe30-e5de-27a3be57eefd@cedaron.com>

We had a major incident here involving bad merges. It was traced to a problem with a custom merge driver.

On studying why the merge driver failed, we found it was in an unrunnable state (the logical equivalent of calling abort()) and could not mark files as conflicted. Since the users were using a graphical frontend the error messages disappeared into the bitbucket.

I've come to the definite conclusion that treating the file as conflicted was wrong and the merge needed to bail out in the middle as though git merge itself bombed. But there doesn't seem to be any way in the protocol to actually do it.

Looking at the merge driver found that some things cannot be handled, such as OOM condition. The fault has to propagate upwards, unwinding as it goes.

Next: Junio C Hamano
Message 1 of 15 in “Design issue in git merge driver interface”
  1. Joshua HudsonJun 22, 2023
  2. Junio C HamanoJun 22, 2023
  3. ll-merge: killing the external merge driver aborts the mergeJunio C Hamano, Jun 23, 2023
  4. Elijah NewrenJun 23, 2023
  5. Junio C HamanoJun 23, 2023
  6. Junio C HamanoJun 23, 2023
  7. Joshua HudsonJun 25, 2023
  8. Johannes SchindelinJun 27, 2023
  9. Joshua HudsonJun 27, 2023
  10. Junio C HamanoJun 27, 2023
  11. Joshua HudsonJun 27, 2023
  12. Junio C HamanoJun 27, 2023
  13. Joshua HudsonJun 27, 2023
  14. Junio C HamanoJun 27, 2023
  15. Joshua HudsonJun 27, 2023

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.