Re: [PATCH v2 3/4] Integrate hash algorithm support with repo setup

2017-10-30 Thread Stefan Beller
On Sat, Oct 28, 2017 at 11:12 AM, brian m. carlson wrote: > > Include repository.h in cache.h since we now need to have access to > these struct and variable definitions. Let's see how that works out. I remember having include issues in the repository struct series.

Re: [PATCH v2 3/4] Integrate hash algorithm support with repo setup

2017-10-29 Thread brian m. carlson
On Mon, Oct 30, 2017 at 11:13:41AM +0900, Junio C Hamano wrote: > Is the plan to allow running with multiple hash algorithms in > parallel? I thought what we want to see in the future codebase was > to have the default hash algorithm used for everything except for a > select few codepaths, and

Re: [PATCH v2 3/4] Integrate hash algorithm support with repo setup

2017-10-29 Thread Junio C Hamano
"brian m. carlson" writes: > On Sun, Oct 29, 2017 at 03:02:20PM -0400, Eric Sunshine wrote: >> On Sun, Oct 29, 2017 at 1:57 PM, brian m. carlson >> wrote: >> > I can do CURRENT_HASH_ALGO or CURRENT_HASH instead if you think that's >> >

Re: [PATCH v2 3/4] Integrate hash algorithm support with repo setup

2017-10-29 Thread brian m. carlson
On Sun, Oct 29, 2017 at 03:02:20PM -0400, Eric Sunshine wrote: > On Sun, Oct 29, 2017 at 1:57 PM, brian m. carlson > wrote: > > I can do CURRENT_HASH_ALGO or CURRENT_HASH instead if you think that's > > an improvement. I originally omitted the "algo" portion to keep

Re: [PATCH v2 3/4] Integrate hash algorithm support with repo setup

2017-10-29 Thread Eric Sunshine
On Sun, Oct 29, 2017 at 1:57 PM, brian m. carlson wrote: > On Sat, Oct 28, 2017 at 09:44:07PM -0400, Eric Sunshine wrote: >> > +#define current_hash the_repository->hash_algo >> >> The all-lowercase name "current_hash" seems likely to conflict with a >> variable name

Re: [PATCH v2 3/4] Integrate hash algorithm support with repo setup

2017-10-29 Thread brian m. carlson
On Sat, Oct 28, 2017 at 09:44:07PM -0400, Eric Sunshine wrote: > > diff --git a/cache.h b/cache.h > > @@ -132,6 +133,8 @@ struct git_hash_algo { > > extern const struct git_hash_algo hash_algos[GIT_HASH_NALGOS]; > > > > +#define current_hash the_repository->hash_algo > > The all-lowercase name

Re: [PATCH v2 3/4] Integrate hash algorithm support with repo setup

2017-10-28 Thread Eric Sunshine
On Sat, Oct 28, 2017 at 2:12 PM, brian m. carlson wrote: > In future versions of Git, we plan to support an additional hash > algorithm. Integrate the enumeration of hash algorithms with repository > setup, and store a pointer to the enumerated data in struct

[PATCH v2 3/4] Integrate hash algorithm support with repo setup

2017-10-28 Thread brian m. carlson
In future versions of Git, we plan to support an additional hash algorithm. Integrate the enumeration of hash algorithms with repository setup, and store a pointer to the enumerated data in struct repository. Of course, we currently only support SHA-1, so hard-code this value in