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] merge-ll: Cleanup merge driver temporaries after interrupt
Date: Fri, 11 Sep 2026 16:43:08 +0200 [thread overview]
Message-ID: <aqQN_Q6ZAeyTy7WA@localhost.localdomain> (raw)
In-Reply-To: <20260910162242.GC251185@coredump.intra.peff.net>
[-- Attachment #1: Type: text/plain, Size: 905 bytes --]
Hi.
On Thu, Sep 10, 2026 at 12:22:42PM -0400, Jeff King <peff@peff.net> wrote:
> We have a temporary-file cleanup handler that we install already, which
> handles signal propagation, atomicity, etc. It seems like it would be
> simpler to just use that.
That sounds like even a better idiom to achieve the goal.
>
> 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).
(There's only a warning about constness, one should not change the
tempfile's path buffer. But here the ovewrite happens only if there were
trialing dirseps, which they aren't as the filename is under control.)
Do you want me to send your variant as v2 or will you?
Thanks,
Michal
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 265 bytes --]
next prev parent reply other threads:[~2026-09-11 14:43 UTC|newest]
Thread overview: 11+ 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ý [this message]
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-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-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
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=aqQN_Q6ZAeyTy7WA@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox