On 2020-05-13 at 19:41:15, Martin Ă…gren wrote: > On Wed, 13 May 2020 at 02:58, brian m. carlson > 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"? Yes, this would be the point at which we'd decide whether we could support the remote side's algorithm and decide to rewrite objects. We might still fail, such as if we're SHA-256 only without a lookup table and the remote side is SHA-1, but theoretically we'd do the conversion here. > > @@ -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. I'll update the message. -- brian m. carlson: Houston, Texas, US OpenPGP: https://keybase.io/bk2204