Re: [PATCH 21/41] http: eliminate hard-coded constants

2018-04-24 Thread brian m. carlson
On Wed, Apr 25, 2018 at 08:44:19AM +0900, Junio C Hamano wrote: > Martin Ågren writes: > > >> switch (data[i]) { > >> case 'P': > >> i++; > >> - if (i + 52 <= buf.len && > >> + if (i + hexsz + 12 <

Re: [PATCH 21/41] http: eliminate hard-coded constants

2018-04-24 Thread Junio C Hamano
Martin Ågren writes: >> switch (data[i]) { >> case 'P': >> i++; >> - if (i + 52 <= buf.len && >> + if (i + hexsz + 12 <= buf.len && >> starts_with(data + i, " pack-") &&

Re: [PATCH 21/41] http: eliminate hard-coded constants

2018-04-24 Thread Martin Ågren
On 24 April 2018 at 01:39, brian m. carlson wrote: > Use the_hash_algo to find the right size for parsing pack names. > > Signed-off-by: brian m. carlson > --- > http.c | 11 ++- > 1 file changed, 6 insertions(+), 5 deletions(-) > > diff --git a/http.c b/http.c > index 3034d10b68..ec7067

[PATCH 21/41] http: eliminate hard-coded constants

2018-04-23 Thread brian m. carlson
Use the_hash_algo to find the right size for parsing pack names. Signed-off-by: brian m. carlson --- http.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/http.c b/http.c index 3034d10b68..ec70676748 100644 --- a/http.c +++ b/http.c @@ -2047,7 +2047,8 @@ int http