Re: [PATCH v4 4/8] repack: refactor finding pack prefix
- From
Taylor Blau <me@ttaylorr.com>
- Date
- Aug 9, 2023, 21:20 UTC
- Message-ID
- <ZNQDFmyX6Egl9hRu@nand.local>
- In-Reply-To
- <20230808082608.582319-5-christian.couder@gmail.com>
On Tue, Aug 08, 2023 at 10:26:04AM +0200, Christian Couder wrote:
Show 18 quoted lines
> Create a new find_pack_prefix() to refactor code that handles finding > the pack prefix from the packtmp and packdir global variables, as we are > going to need this feature again in following commit. > > Signed-off-by: Christian Couder <chriscool@tuxfamily.org > --- > builtin/repack.c | 18 ++++++++++++------ > 1 file changed, 12 insertions(+), 6 deletions(-) > > diff --git a/builtin/repack.c b/builtin/repack.c > index 96af2d1caf..4e40f4c04e 100644 > --- a/builtin/repack.c > +++ b/builtin/repack.c > @@ -783,6 +783,17 @@ static int write_cruft_pack(const struct pack_objects_args *args, > return finish_pack_objects_cmd(&cmd, names, local); > } > > +static const char *find_pack_prefix(char *packdir, char *packtmp)
I'm definitely nitpicking here, but I think that both of these could be "const" to indicate that we're not modifying "packdir" or "packtmp".
But again, definitely not worth a reroll.
Thanks, Taylor