Re: [PATCH 23/41] upload-pack: replace use of several hard-coded constants

2018-04-24 Thread Simon Ruderich
On Mon, Apr 23, 2018 at 11:39:33PM +, brian m. carlson wrote: > [snip] > > diff --git a/upload-pack.c b/upload-pack.c > index 4a82602be5..0858527c5b 100644 > --- a/upload-pack.c > +++ b/upload-pack.c > @@ -450,7 +450,7 @@ static int get_common_commits(void) > break

[PATCH 23/41] upload-pack: replace use of several hard-coded constants

2018-04-23 Thread brian m. carlson
Update several uses of hard-coded 40-based constants to use either the_hash_algo or GIT_MAX_HEXSZ, as appropriate. Replace a combined use of oid_to_hex and memcpy with oid_to_hex_r, which not only avoids the need for a constant, but is more efficient. Make use of parse_oid_hex to eliminate the ne