All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michal Koutný" <mkoutny@suse.com>
To: Jeff King <peff@peff.net>
Cc: git@vger.kernel.org, "Jean Delvare" <jdelvare@suse.de>,
	"Elijah Newren" <newren@gmail.com>,
	"Usman Akinyemi" <usmanakinyemi202@gmail.com>,
	"Taylor Blau" <me@ttaylorr.com>,
	"Junio C Hamano" <gitster@pobox.com>,
	"René Scharfe" <l.s.r@web.de>
Subject: Re: [PATCH v2 0/3] merge-ll: Cleanup merge driver temporaries after
Date: Mon, 14 Sep 2026 15:23:28 +0200	[thread overview]
Message-ID: <aqf0fw2igdjsXe-V@localhost.localdomain> (raw)
In-Reply-To: <20260911171044.GA1609692@coredump.intra.peff.net>

[-- Attachment #1: Type: text/plain, Size: 1589 bytes --]

On Fri, Sep 11, 2026 at 01:10:44PM -0400, Jeff King <peff@peff.net> wrote:
> 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.
 
> 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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 265 bytes --]

  parent reply	other threads:[~2026-09-14 13:23 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-10 15:06 [PATCH] merge-ll: Cleanup merge driver temporaries after interrupt Michal Koutný
2026-09-10 16:22 ` Jeff King
2026-09-11 14:43   ` Michal Koutný
2026-09-11 17:10     ` [PATCH v2 0/3] merge-ll: Cleanup merge driver temporaries after Jeff King
2026-09-11 17:11       ` [PATCH v2 1/3] merge-ll: use strbuf to read back external merge result Jeff King
2026-09-11 18:06         ` Elijah Newren
2026-09-11 18:32           ` Junio C Hamano
2026-09-14 16:53           ` Jeff King
2026-09-11 17:11       ` [PATCH v2 2/3] merge-ll: catch close() errors when writing external tempfiles Jeff King
2026-09-11 18:06         ` Elijah Newren
2026-09-14 16:56           ` Jeff King
2026-09-11 17:13       ` [PATCH v2 3/3] merge-ll: use tempfile API for external driver files Jeff King
2026-09-11 18:10         ` Elijah Newren
2026-09-14 13:24           ` Michal Koutný
2026-09-14 16:57             ` Jeff King
2026-09-14 13:23       ` Michal Koutný [this message]
2026-09-14 16:59         ` [PATCH v2 0/3] merge-ll: Cleanup merge driver temporaries after Jeff King
2026-09-29  5:12       ` [PATCH v3 0/2] merge-ll: Cleanup merge driver temporaries after signal Jeff King
2026-09-29  5:12         ` [PATCH v3 1/2] merge-ll: catch close() errors when writing external tempfiles Jeff King
2026-09-29  5:13         ` [PATCH v3 2/2] merge-ll: use tempfile API for external driver files Jeff King
2026-09-29 16:51           ` Junio C Hamano
2026-09-29 18:25             ` Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aqf0fw2igdjsXe-V@localhost.localdomain \
    --to=mkoutny@suse.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jdelvare@suse.de \
    --cc=l.s.r@web.de \
    --cc=me@ttaylorr.com \
    --cc=newren@gmail.com \
    --cc=peff@peff.net \
    --cc=usmanakinyemi202@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.