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

Re: [PATCH v2 0/3] merge-ll: Cleanup merge driver temporaries after

From
MKMichal Koutný <mkoutny@suse.com>
Date
Sep 14, 2026, 13:23 UTC
Message-ID
<aqf0fw2igdjsXe-V@localhost.localdomain>
In-Reply-To
<20260911171044.GA1609692@coredump.intra.peff.net>
On Fri, Sep 11, 2026 at 01:10:44PM -0400, Jeff King <peff@peff.net> wrote:
Show 15 quoted lines
> On Fri, Sep 11, 2026 at 04:43:08PM +0200, Michal Koutný wrote:
> 
> > > In the worst case we can just call register_tempfile() on each path, but
> > > I think this code could be taught to use the actual creation. Something
> > > like the patch below (only lightly tested).
> > 
> > I've tested it and it works (cleans up both after SIGINT and regular
> > termination).
> 
> Thanks for testing. I considered putting something in the test suite,
> but it gets ugly (we'd have the external driver pause, signal a fifo,
> then kill git-merge and it with SIGINT). I guess an alternative would be
> setting GIT_ALLOC_LIMIT to something low, and then generating a
> too-large output, which would cause xmalloc() to fail, which I believe
> would also fail. But then we're not really testing the signal handling.
Show 6 quoted lines
> Hmm. I wonder if leaving the files could actually be a _feature_. If you
> completed the merge with the external tool but we barfed reading it back
> in, would it be useful to leave the file in place? It's possible, I
> suppose, but I think it is more likely to be a nuisance (and we already
> delete it for things like read() errors, just not anything that would
> cause us to die()).

From the user perspective, this is unnecessary. (Potentially useful for debugging the merge tool.) For the former, the whole merge can retried (after restoring state), the latter is quite rare and can be worked around easily when the merge tool is under development.

0.02€, Michal

Previous: Jeff KingNext: Jeff King
Message 16 of 22 in “merge-ll: Cleanup merge driver temporaries after interrupt”
  1. merge-ll: Cleanup merge driver temporaries after interruptMichal Koutný, Sep 10, 2026
  2. Jeff KingSep 10, 2026
  3. Michal KoutnýSep 11, 2026
  4. 0/3 merge-ll: Cleanup merge driver temporaries afterJeff King, Sep 11, 2026
  5. 1/3 merge-ll: use strbuf to read back external merge resultJeff King, Sep 11, 2026
  6. Elijah NewrenSep 11, 2026
  7. Junio C HamanoSep 11, 2026
  8. Jeff KingSep 14, 2026
  9. 2/3 merge-ll: catch close() errors when writing external tempfilesJeff King, Sep 11, 2026
  10. Elijah NewrenSep 11, 2026
  11. Jeff KingSep 14, 2026
  12. 3/3 merge-ll: use tempfile API for external driver filesJeff King, Sep 11, 2026
  13. Elijah NewrenSep 11, 2026
  14. Michal KoutnýSep 14, 2026
  15. Jeff KingSep 14, 2026
  16. Michal KoutnýSep 14, 2026
  17. Jeff KingSep 14, 2026
  18. 0/2 merge-ll: Cleanup merge driver temporaries after signalJeff King, Sep 29, 2026
  19. 1/2 merge-ll: catch close() errors when writing external tempfilesJeff King, Sep 29, 2026
  20. 2/2 merge-ll: use tempfile API for external driver filesJeff King, Sep 29, 2026
  21. Junio C HamanoSep 29, 2026
  22. Jeff KingSep 29, 2026

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.