Now that all the callers of get_sha1 directly or indirectly use struct
object_id, rename the functions starting with get_sha1 to start with
get_oid. Convert the internals in sha1_name.c to use struct object_id
as well, and eliminate explicit length checks where possible.
Outside of sha1_name.c an
> @@ -496,8 +496,8 @@ int find_unique_abbrev_r(char *hex, const unsigned char
> *sha1, int len)
> return 40;
> exists = has_sha1_file(sha1);
> while (len < 40) {
Here are two prime candidates for GIT_SHA1_HEXSZ, too.
> @@ -636,7 +636,7 @@ static int get_sha1_basic
Stefan Beller writes:
>> @@ -636,7 +636,7 @@ static int get_sha1_basic(const char *str, int len,
>> unsigned char *sha1,
>> int detached;
>>
>> if (interpret_nth_prior_checkout(str, len, &buf) > 0) {
>> - detached = (buf.len == 40 && !get_sha
On Wed, Jul 05, 2017 at 11:38:51AM -0700, Junio C Hamano wrote:
> Stefan Beller writes:
>
> >> @@ -636,7 +636,7 @@ static int get_sha1_basic(const char *str, int len,
> >> unsigned char *sha1,
> >> int detached;
> >>
> >> if (interpret_nth_prior_checkout(str, len,
4 matches
Mail list logo