Re: [PATCH 19/49] repack: remove 'existing_packs' API from the builtin
- From
Jeff King <peff@peff.net>
- Date
- Oct 10, 2025, 06:08 UTC
- Message-ID
- <20251010060836.GG1965904@coredump.intra.peff.net>
- In-Reply-To
- <ae267fcc820dc19497f9f897bc5915b2040739e5.1759097191.git.me@ttaylorr.com>
On Sun, Sep 28, 2025 at 06:08:23PM -0400, Taylor Blau wrote:
Show 23 quoted lines
> --- a/repack.h
> +++ b/repack.h
> @@ -2,6 +2,7 @@
> #define REPACK_H
>
> #include "list-objects-filter-options.h"
> +#include "string-list.h"
>
> struct pack_objects_args {
> char *window;
> @@ -31,4 +32,38 @@ void pack_objects_args_release(struct pack_objects_args *args);
> void repack_remove_redundant_pack(struct repository *repo, const char *dir_name,
> const char *base_name);
>
> +struct repository;
> +struct packed_git;
> +
> +struct existing_packs {
> + struct repository *repo;
> + struct string_list kept_packs;
> + struct string_list non_kept_packs;
> + struct string_list cruft_packs;
> +};Earlier, I saw remove_redundant_pack() got namespaced with a "repack_" prefix. Which I think makes sense, since it's a pretty generic name and the symbol now has global visibility. But none of this existing_packs stuff got the same treatment.
I don't know how much it matters. I certainly have no plans to call something existing_packs elsewhere in the code, but I do wonder if the naming should make it more clear this is all repack-related.
-Peff