Re: [PATCH v3 4/5] sha1_name: Parse less while finding common prefix

2017-10-04 Thread Junio C Hamano
Derrick Stolee writes: > diff --git a/sha1_name.c b/sha1_name.c > index f2a1ebe49..5081aeb71 100644 > --- a/sha1_name.c > +++ b/sha1_name.c > @@ -480,13 +480,23 @@ struct min_abbrev_data { > char *hex; > }; > > +static inline char get_hex_char_from_oid(const

[PATCH v3 4/5] sha1_name: Parse less while finding common prefix

2017-10-02 Thread Derrick Stolee
Create get_hex_char_from_oid() to parse oids one hex character at a time. This prevents unnecessary copying of hex characters in extend_abbrev_len() when finding the length of a common prefix. p0008.1: find_unique_abbrev() for existing objects --