Re: [PATCH 10/49] builtin/repack.c: avoid using `hash_to_hex()` in pack geometry

Patrick Steinhardt
2025-09-29T23:21:27Z

On Sun, Sep 28, 2025 at 06:07:49PM -0400, Taylor Blau wrote:
> In previous commits, we started passing either repository or
> git_hash_algo pointers around to various spots within builtin/repack.c
> to reduce our dependency on the_repository in the hope of undef'ing
> USE_THE_REPOSITORY_VARIABLE.
>
> This commit takes us as far as we can (easily) go in that direction by
> removing the only use of a convenience function that only exists when
> USE_THE_REPOSITORY_VARIABLE is defined.
>
> Unfortunately, the only other such function is "is_bare_repository()",
> which is less than straightforward to convert into, say,
> "repo_is_bare()", the latter of the two accepting a repository pointer.

Yeah, this function has been annoying me for quite a while already. It's
definitely non-trivial to convert, so punting it into the future makes
sense to me.

Patrick