Subject: Re: [PATCH 01/20] packfile: pass down repository to `odb_pack_name`

From: Taylor Blau <[email-masked]>
Date: Mon, 21 Oct 2024 17:06:34 -0400

On Mon, Oct 21, 2024 at 11:57:44AM +0200, Karthik Nayak wrote:
> diff --git a/builtin/pack-redundant.c b/builtin/pack-redundant.c
> index 5809613002..60f806e672 100644
> --- a/builtin/pack-redundant.c
> +++ b/builtin/pack-redundant.c
> @@ -688,7 +688,7 @@ int cmd_pack_redundant(int argc, const char **argv, const char *prefix UNUSED, s
>  	pl = red = pack_list_difference(local_packs, min);
>  	while (pl) {
>  		printf("%s\n%s\n",
> -		       sha1_pack_index_name(pl->pack->hash),
> +		       sha1_pack_index_name(the_repository, pl->pack->hash),
>  		       pl->pack->pack_name);
>  		pl = pl->next;
>  	}

I am a little surprised to see sha1_pack_index_name() converted
similarly here, as this patch promises only to touch the
'odb_pack_name()' function.

> diff --git a/packfile.h b/packfile.h
> index 0f78658229..507ac602b5 100644
> --- a/packfile.h
> +++ b/packfile.h

Indeed, it looks like odb_pack_name(), sha1_pack_name(),
sha1_pack_index_name(), parse_pack_index(), and has_pack_index() are all
modified. Were these meant to go in separate patches?

Thanks,
Taylor