summaryrefslogtreecommitdiff
path: root/http-backend.c
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2019-02-19 00:05:10 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-04-01 02:57:38 (GMT)
commitf786ae9ff91e356960521b3a0db95c5a66b59809 (patch)
tree2267a7a42bb62df69fff3af453de950a63342f38 /http-backend.c
parentf024b87a086643bbe6c869af11eee27aaaebb074 (diff)
downloadgit-f786ae9ff91e356960521b3a0db95c5a66b59809.zip
git-f786ae9ff91e356960521b3a0db95c5a66b59809.tar.gz
git-f786ae9ff91e356960521b3a0db95c5a66b59809.tar.bz2
http-backend: allow 64-character hex names
In an SHA-256-backed repository using the http-backend handler for dumb protocol clients, it may be necessary to access the raw packs using their full SHA-256-specified names. Allow packs and loose objects to be accessed using their full SHA-256-specified 64-character hex names. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'http-backend.c')
-rw-r--r--http-backend.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/http-backend.c b/http-backend.c
index 29e68e3..ec3144b 100644
--- a/http-backend.c
+++ b/http-backend.c
@@ -711,8 +711,11 @@ static struct service_cmd {
{"GET", "/objects/info/http-alternates$", get_text_file},
{"GET", "/objects/info/packs$", get_info_packs},
{"GET", "/objects/[0-9a-f]{2}/[0-9a-f]{38}$", get_loose_object},
+ {"GET", "/objects/[0-9a-f]{2}/[0-9a-f]{62}$", get_loose_object},
{"GET", "/objects/pack/pack-[0-9a-f]{40}\\.pack$", get_pack_file},
+ {"GET", "/objects/pack/pack-[0-9a-f]{64}\\.pack$", get_pack_file},
{"GET", "/objects/pack/pack-[0-9a-f]{40}\\.idx$", get_idx_file},
+ {"GET", "/objects/pack/pack-[0-9a-f]{64}\\.idx$", get_idx_file},
{"POST", "/git-upload-pack$", service_rpc},
{"POST", "/git-receive-pack$", service_rpc}