Re: [PATCH v2 2/7] gc: convert to using the_hash_algo

2019-03-15 Thread Johannes Schindelin
Hi Ævar, On Fri, 15 Mar 2019, Ævar Arnfjörð Bjarmason wrote: > > On Fri, Mar 15 2019, Duy Nguyen wrote: > > > On Thu, Mar 14, 2019 at 7:34 PM Ævar Arnfjörð Bjarmason > > wrote: > >> > >> There's been a lot of changing of the hardcoded "40" values to > >> the_hash_algo->hexsz, but we've so far

Re: [PATCH v2 2/7] gc: convert to using the_hash_algo

2019-03-15 Thread Ævar Arnfjörð Bjarmason
On Fri, Mar 15 2019, Duy Nguyen wrote: > On Thu, Mar 14, 2019 at 7:34 PM Ævar Arnfjörð Bjarmason > wrote: >> >> There's been a lot of changing of the hardcoded "40" values to >> the_hash_algo->hexsz, but we've so far missed this one where we >> hardcoded 38 for the loose object file length. > >

Re: [PATCH v2 2/7] gc: convert to using the_hash_algo

2019-03-15 Thread Duy Nguyen
On Thu, Mar 14, 2019 at 7:34 PM Ævar Arnfjörð Bjarmason wrote: > > There's been a lot of changing of the hardcoded "40" values to > the_hash_algo->hexsz, but we've so far missed this one where we > hardcoded 38 for the loose object file length. Wow. Good catch. > diff --git a/builtin/gc.c b/buil

[PATCH v2 2/7] gc: convert to using the_hash_algo

2019-03-14 Thread Ævar Arnfjörð Bjarmason
There's been a lot of changing of the hardcoded "40" values to the_hash_algo->hexsz, but we've so far missed this one where we hardcoded 38 for the loose object file length. This is because a SHA-1 like abcde[...] gets turned into objects/ab/cde[...]. There's no reason to suppose the same won't be