From: Junio C Hamano <gitster@pobox.com>
To: Taylor Blau <me@ttaylorr.com>
Cc: git@vger.kernel.org, Jeff King <peff@peff.net>,
Elijah Newren <newren@gmail.com>
Subject: Re: [PATCH 0/2] commit-graph/server-info: use tempfile.h in more places
Date: Fri, 07 Jun 2024 08:40:07 -0700 [thread overview]
Message-ID: <xmqq4ja4hico.fsf@gitster.g> (raw)
In-Reply-To: <cover.1717712358.git.me@ttaylorr.com> (Taylor Blau's message of "Thu, 6 Jun 2024 18:19:21 -0400")
Taylor Blau <me@ttaylorr.com> writes:
> This pair of patches addresses two issues (in the commit-graph and
> update-server-info areas, respectively), where temporary files are
> created outside of the tempfile.h API and thus survive abnormal process
> death.
>
> The commit-graph one is more prevalent, and has been the cause of some
> minor headaches (for e.g. automated tooling to detect repository cruft
> at GitHub complaining about unknown tmp_graph_XXXXXX files left around).
;-)
I'd be very surprised if a stale "update-server-info" product causes
any harm, but we unfortunately cannot remove it until we fully
remove the suport for HTTP walkers.
> The fixes in both instances are relatively straightforward conversions
> to use the tempfile.h API.
> Looking at the remaining uses of mkstemp(), the remaining class of
> callers that don't use the tempfile.h API are for creating temporary
> .idx, .rev files, and similar. My personal feeling is that we should
> apply similar treatment there, since these files are generated based on
> .pack data, and thus keeping around temporary copies is unnecessary when
> they can be regenerated.
Absolutely.
I wouldn't be surprised by .idx as it and .pack are so old, dating
back to 2005, but anything newer like .rev I am mildly surprised
that we haven't done this conversion.
next prev parent reply other threads:[~2024-06-07 15:40 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-06 22:19 [PATCH 0/2] commit-graph/server-info: use tempfile.h in more places Taylor Blau
2024-06-06 22:19 ` [PATCH 1/2] commit-graph.c: remove temporary graph layers on exit Taylor Blau
2024-06-07 16:33 ` Junio C Hamano
2024-06-07 21:41 ` Taylor Blau
2024-06-07 21:47 ` Junio C Hamano
2024-06-08 9:42 ` Jeff King
2024-06-07 21:49 ` Junio C Hamano
2024-06-08 9:53 ` Jeff King
2024-06-06 22:19 ` [PATCH 2/2] server-info.c: remove temporary info files " Taylor Blau
2024-06-07 16:02 ` Junio C Hamano
2024-06-07 21:44 ` Taylor Blau
2024-06-07 21:49 ` Junio C Hamano
2024-06-08 10:25 ` Jeff King
2024-06-07 15:40 ` Junio C Hamano [this message]
2024-06-08 10:48 ` [PATCH 0/2] commit-graph/server-info: use tempfile.h in more places Jeff King
2024-06-14 17:41 ` Elijah Newren
2024-06-14 19:35 ` Taylor Blau
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=xmqq4ja4hico.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=me@ttaylorr.com \
--cc=newren@gmail.com \
--cc=peff@peff.net \
/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.