Re: [PATCH 35/44] remote-curl: detect algorithm for dumb HTTP by size

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

 



On Wed, 13 May 2020 at 02:57, brian m. carlson
<sandals@xxxxxxxxxxxxxxxxxxxx> wrote:

> +       options.hash_algo = detect_hash_algo(heads);
> +       if (!options.hash_algo)
> +               die("%sinfo/refs not valid: could not determine hash algorithm; "
> +                   "is this a git repository?",
> +                   url.buf);

Should this use `transport_anonymize_url()`?

>                 if (data[i] == '\n') {
> -                       if (mid - start != the_hash_algo->hexsz)
> +                       if (mid - start != options.hash_algo->hexsz)
>                                 die(_("%sinfo/refs not valid: is this a git repository?"),
>                                     transport_anonymize_url(url.buf));

Like here and elsewhere.

>                         data[i] = 0;
>                         ref_name = mid + 1;
>                         ref = alloc_ref(ref_name);
> -                       get_oid_hex(start, &ref->old_oid);
> +                       get_oid_hex_algop(start, &ref->old_oid, options.hash_algo);

Other than that, looks ok.



Martin



[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