Re: [PATCH 11/12] sha1_name: convert get_sha1* to get_oid*

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> @@ -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(const char *str, int len, unsigned char *sha1,
>                 int detached;
>
>                 if (interpret_nth_prior_checkout(str, len, &buf) > 0) {
> -                       detached = (buf.len == 40 && !get_sha1_hex(buf.buf, sha1));
> +                       detached = (!get_oid_hex(buf.buf, oid));

omitting the length check here?



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux