Re: [PATCH 18/41] index-pack: abstract away hash function constant

2018-04-27 Thread Duy Nguyen
On Fri, Apr 27, 2018 at 11:08 PM, brian m. carlson wrote: > On Thu, Apr 26, 2018 at 05:46:28PM +0200, Duy Nguyen wrote: >> On Wed, Apr 25, 2018 at 8:49 PM, Martin Ågren wrote: >> > Once that is accomplished, I sort of suspect that this code

Re: [PATCH 18/41] index-pack: abstract away hash function constant

2018-04-27 Thread brian m. carlson
On Thu, Apr 26, 2018 at 05:46:28PM +0200, Duy Nguyen wrote: > On Wed, Apr 25, 2018 at 8:49 PM, Martin Ågren wrote: > > Once that is accomplished, I sort of suspect that this code will want to > > be updated to not always blindly use the_hash_algo, but to always work > >

Re: [PATCH 18/41] index-pack: abstract away hash function constant

2018-04-26 Thread Duy Nguyen
On Wed, Apr 25, 2018 at 8:49 PM, Martin Ågren wrote: >> I agree that pack v2 is not going to have anything but SHA-1. However, >> writing all the code such that it's algorithm agnostic means that we can >> do testing of new algorithms by wholesale replacing the algorithm

Re: [PATCH 18/41] index-pack: abstract away hash function constant

2018-04-25 Thread Martin Ågren
On 25 April 2018 at 01:51, brian m. carlson wrote: > On Tue, Apr 24, 2018 at 11:50:16AM +0200, Martin Ågren wrote: >> On 24 April 2018 at 01:39, brian m. carlson >> wrote: >> > The code for reading certain pack v2 offsets had a

Re: [PATCH 18/41] index-pack: abstract away hash function constant

2018-04-24 Thread brian m. carlson
On Tue, Apr 24, 2018 at 11:50:16AM +0200, Martin Ågren wrote: > On 24 April 2018 at 01:39, brian m. carlson > wrote: > > The code for reading certain pack v2 offsets had a hard-coded 5 > > representing the number of uint32_t words that we needed to skip over. > >

Re: [PATCH 18/41] index-pack: abstract away hash function constant

2018-04-24 Thread Martin Ågren
On 24 April 2018 at 01:39, brian m. carlson wrote: > The code for reading certain pack v2 offsets had a hard-coded 5 > representing the number of uint32_t words that we needed to skip over. > Specify this value in terms of a value from the_hash_algo. > >

[PATCH 18/41] index-pack: abstract away hash function constant

2018-04-23 Thread brian m. carlson
The code for reading certain pack v2 offsets had a hard-coded 5 representing the number of uint32_t words that we needed to skip over. Specify this value in terms of a value from the_hash_algo. Signed-off-by: brian m. carlson --- builtin/index-pack.c | 3 ++- 1