From: Jeff King Date: Tue, 14 Jul 2026 07:13:31 GMT Subject: Re: [PATCH 2/2] fetch-pack: accept "pack" output for packfile URIs Message-ID: <20260714071331.GA4058163@coredump.intra.peff.net> In-Reply-To: <20260714071231.GD2516582@coredump.intra.peff.net> On Tue, Jul 14, 2026 at 03:12:31AM -0400, Jeff King wrote: > 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