Re: [PATCH 10/49] builtin/repack.c: avoid using `hash_to_hex()` in pack geometry
- From
Patrick Steinhardt <ps@pks.im>
- Date
- Sep 29, 2025, 23:21 UTC
- Message-ID
- <aNsUcqHqvylWbZCA@pks.im>
- In-Reply-To
- <de4886466cab65dc72c5f800d680a610dcb0563c.1759097191.git.me@ttaylorr.com>
On Sun, Sep 28, 2025 at 06:07:49PM -0400, Taylor Blau wrote:
Show 12 quoted lines
> 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