From a2ba162cda2acc171c3e36acbbc854792b093cb7 Mon Sep 17 00:00:00 2001 From: Bruno Albuquerque Date: Tue, 20 Apr 2021 16:38:31 -0700 Subject: 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 Signed-off-by: Junio C Hamano --- serve.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'serve.c') 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) -- cgit v1.3