diff options
author | Bruno Albuquerque <bga@google.com> | 2021-04-21 01:38:31 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-04-21 02:41:13 +0200 |
commit | a2ba162cda2acc171c3e36acbbc854792b093cb7 (patch) | |
tree | 7e276bdd845e0291feb9aae460e074a73b7efca7 /serve.c | |
parent | The tenth batch (diff) | |
download | git-a2ba162cda2acc171c3e36acbbc854792b093cb7.tar.xz git-a2ba162cda2acc171c3e36acbbc854792b093cb7.zip |
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.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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) |