diff options
author | brian m. carlson <sandals@crustytoothpaste.net> | 2020-05-25 21:58:51 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-05-27 19:07:06 +0200 |
commit | bf30dbf82611e3bb7e2bbac1d38bb38ad10c8636 (patch) | |
tree | 6f7e3e740deb2127251fdb180412732635af8719 /upload-pack.c | |
parent | wrapper: add function to compare strings with different NUL termination (diff) | |
download | git-bf30dbf82611e3bb7e2bbac1d38bb38ad10c8636.tar.xz git-bf30dbf82611e3bb7e2bbac1d38bb38ad10c8636.zip |
remote: advertise the object-format capability on the server side
Advertise the current hash algorithm in use by using the object-format
capability as part of the ref advertisement.
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'upload-pack.c')
-rw-r--r-- | upload-pack.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/upload-pack.c b/upload-pack.c index 902d0ad5e1..df6cb51db7 100644 --- a/upload-pack.c +++ b/upload-pack.c @@ -1005,7 +1005,7 @@ static int send_ref(const char *refname, const struct object_id *oid, struct strbuf symref_info = STRBUF_INIT; format_symref_info(&symref_info, cb_data); - packet_write_fmt(1, "%s %s%c%s%s%s%s%s%s agent=%s\n", + packet_write_fmt(1, "%s %s%c%s%s%s%s%s%s object-format=%s agent=%s\n", oid_to_hex(oid), refname_nons, 0, capabilities, (allow_unadvertised_object_request & ALLOW_TIP_SHA1) ? @@ -1015,6 +1015,7 @@ static int send_ref(const char *refname, const struct object_id *oid, stateless_rpc ? " no-done" : "", symref_info.buf, allow_filter ? " filter" : "", + the_hash_algo->name, git_user_agent_sanitized()); strbuf_release(&symref_info); } else { |