git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] commit-graph/server-info: use tempfile.h in more places
@ 2024-06-06 22:19 Taylor Blau
  2024-06-06 22:19 ` [PATCH 1/2] commit-graph.c: remove temporary graph layers on exit Taylor Blau
                   ` (3 more replies)
  0 siblings, 4 replies; 17+ messages in thread
From: Taylor Blau @ 2024-06-06 22:19 UTC (permalink / raw)
  To: git; +Cc: Jeff King, Elijah Newren, Junio C Hamano

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).

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.

But I'd rather keep that part out of this series and clean up a couple
of more straightforward spots where possible.

Thanks in advance for your review!

Taylor Blau (2):
  commit-graph.c: remove temporary graph layers on exit
  server-info.c: remove temporary info files on exit

 commit-graph.c                | 19 ++++++++-----------
 server-info.c                 | 26 ++++++++++----------------
 t/t5324-split-commit-graph.sh | 26 +++++++++++++++++++++++++-
 3 files changed, 43 insertions(+), 28 deletions(-)


base-commit: 7b0defb3915eaa0bd118f0996e8c00b4eb2dc1ca
-- 
2.45.2.411.g2d5a0536af1

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2024-06-14 19:35 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH 0/2] commit-graph/server-info: use tempfile.h in more places Junio C Hamano
2024-06-08 10:48 ` Jeff King
2024-06-14 17:41   ` Elijah Newren
2024-06-14 19:35   ` Taylor Blau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).