Re: [PATCH 11/44] send-pack: detect when the server doesn't support our hash

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

 



On Wed, 13 May 2020 at 02:58, brian m. carlson
<sandals@xxxxxxxxxxxxxxxxxxxx> wrote:
>
> Detect when the server doesn't support our hash algorithm and abort.

> +       if (!server_supports_hash(the_hash_algo->name, &object_format_supported))
> +               die(_("the receiving end does not support this repository's hash algorithm"));

I suppose this isn't the long-term wanted behavior? Would this be where
we would later learn to realize that "oh, crap, we need to
convert/translate on the fly"?

> @@ -428,6 +432,8 @@ int send_pack(struct send_pack_args *args,
>                 strbuf_addstr(&cap_buf, " atomic");
>         if (use_push_options)
>                 strbuf_addstr(&cap_buf, " push-options");
> +       if (object_format_supported)
> +               strbuf_addf(&cap_buf, " object-format=%s", the_hash_algo->name);

This isn't advertised in the log message: If we do detect support, go on
to reply with our choice of object format / hash algo name.


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