Re: [PATCH 41/49] builtin/repack.c: use `write_pack_opts` within `write_cruft_pack()`
From: Jeff King <hidden>
Date: 2025-10-15 10:29:54
From: Jeff King <hidden>
Date: 2025-10-15 10:29:54
On Sun, Sep 28, 2025 at 06:09:57PM -0400, Taylor Blau wrote:
-static int write_cruft_pack(const struct pack_objects_args *args, - const char *destination, - const char *pack_prefix, +static int write_cruft_pack(struct write_pack_opts *opts, const char *cruft_expiration, unsigned long combine_cruft_below_size, struct string_list *names,
Following on the comment from the previous commit, I guess with my proposal we'd have to call find_pack_prefix() ourselves here in write_cruft_pack(). OTOH, this call...
@@ -599,6 +597,13 @@ int cmd_repack(int argc, if (pack_everything & PACK_CRUFT) { const char *pack_prefix = find_pack_prefix(packdir, packtmp); + struct write_pack_opts opts = { + .po_args = &cruft_po_args, + .destination = packtmp, + .pack_prefix = pack_prefix, + .packtmp = packtmp, + .packdir = packdir, + };
...would go away, so I think it is net the same number of lines. -Peff