Re: [PATCH 10/20] sha1_name: convert struct disambiguate_state to object_id
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Mar 20, 2017, 13:07 UTC
- Message-ID
- <CACsJy8ACRgcE0SV2qa4bU+QdT7=WMcBRkV=cr4SR-bcXxTMj9Q@mail.gmail.com>
- In-Reply-To
- <20170318211954.564030-11-sandals@crustytoothpaste.net>
On Sun, Mar 19, 2017 at 4:19 AM, brian m. carlson <sandals@crustytoothpaste.net> wrote:
Show 6 quoted lines
> @@ -332,7 +332,7 @@ static int init_object_disambiguation(const char *name, int len, > ds->hex_pfx[i] = c; > if (!(i & 1)) > val <<= 4; > - ds->bin_pfx[i >> 1] |= val; > + ds->bin_pfx.hash[i >> 1] |= val;
The indexing makes me a bit nervous, especially since diff context here is too narrow to see. It would be nice if this code (at the beginning of init_object_disambiguation) is converted here too
if (len < MINIMUM_ABBREV || len > GIT_SHA1_HEXSZ)
return -1;-- Duy