On Tue, Jul 14, 2026 at 03:12:31AM -0400, Jeff King wrote:
quoted hunk ↗ jump to hunk
Would a more generic name like "cmd_output" or something make sense? I
also think this would all be much nicer with a strbuf (which would let
us get rid of the magic numbers), but that is a slightly larger
refactor:
diff --git a/fetch-pack.c b/fetch-pack.c
In case anybody does pursue this, it is obviously missing this bit:
diff --git a/fetch-pack.c b/fetch-pack.c
index 5f94f35c30..359740f231 100644
--- a/fetch-pack.c
+++ b/fetch-pack.c
@@ -1935,6 +1935,8 @@ static struct ref *do_fetch_pack_v2(struct fetch_pack_args *args,
xstrfmt("%s/pack/pack-%s.keep",
repo_get_object_directory(the_repository),
packhash));
+
+ strbuf_release(&cmd_output);
}
string_list_clear(&packfile_uris, 0);
strvec_clear(&index_pack_args);
to avoid a leak.
-Peff