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:
authorBruno Albuquerque <bga@google.com>2021-04-21 02:38:31 +0300
committerJunio C Hamano <gitster@pobox.com>2021-04-21 03:41:13 +0300
commita2ba162cda2acc171c3e36acbbc854792b093cb7 (patch)
tree7e276bdd845e0291feb9aae460e074a73b7efca7 /serve.c
parentd1b10fc6d84d49796026e567833b88c7f8886c35 (diff)
object-info: support for retrieving object info
Sometimes it is useful to get information of an object without having to download it completely. Add the "object-info" capability that lets the client ask for object-related information with their full hexadecimal object names. Only sizes are returned for now. Signed-off-by: Bruno Albuquerque <bga@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'serve.c')
-rw-r--r--serve.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/serve.c b/serve.c
index ac20c72763..aa8209f147 100644
--- a/serve.c
+++ b/serve.c
@@ -5,6 +5,7 @@
#include "version.h"
#include "strvec.h"
#include "ls-refs.h"
+#include "protocol-caps.h"
#include "serve.h"
#include "upload-pack.h"
@@ -78,6 +79,7 @@ static struct protocol_capability capabilities[] = {
{ "server-option", always_advertise, NULL },
{ "object-format", object_format_advertise, NULL },
{ "session-id", session_id_advertise, NULL },
+ { "object-info", always_advertise, cap_object_info },
};
static void advertise_capabilities(void)