Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2020-05-25 22:58:51 +0300
committerJunio C Hamano <gitster@pobox.com>2020-05-27 20:07:06 +0300
commitbf30dbf82611e3bb7e2bbac1d38bb38ad10c8636 (patch)
tree6f7e3e740deb2127251fdb180412732635af8719 /builtin/receive-pack.c
parent14570dc67d2a500dfb9f33a7445bdbd6133af4ac (diff)
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 'builtin/receive-pack.c')
-rw-r--r--builtin/receive-pack.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c
index d37ab776b3..a4159b559e 100644
--- a/builtin/receive-pack.c
+++ b/builtin/receive-pack.c
@@ -248,6 +248,7 @@ static void show_ref(const char *path, const struct object_id *oid)
strbuf_addf(&cap, " push-cert=%s", push_cert_nonce);
if (advertise_push_options)
strbuf_addstr(&cap, " push-options");
+ strbuf_addf(&cap, " object-format=%s", the_hash_algo->name);
strbuf_addf(&cap, " agent=%s", git_user_agent_sanitized());
packet_write_fmt(1, "%s %s%c%s\n",
oid_to_hex(oid), path, 0, cap.buf);