Skip to content

Commit f786ae9

Browse files
bk2204gitster
authored andcommitted
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>
1 parent f024b87 commit f786ae9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

http-backend.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -711,8 +711,11 @@ static struct service_cmd {
711711
{"GET", "/objects/info/http-alternates$", get_text_file},
712712
{"GET", "/objects/info/packs$", get_info_packs},
713713
{"GET", "/objects/[0-9a-f]{2}/[0-9a-f]{38}$", get_loose_object},
714+
{"GET", "/objects/[0-9a-f]{2}/[0-9a-f]{62}$", get_loose_object},
714715
{"GET", "/objects/pack/pack-[0-9a-f]{40}\\.pack$", get_pack_file},
716+
{"GET", "/objects/pack/pack-[0-9a-f]{64}\\.pack$", get_pack_file},
715717
{"GET", "/objects/pack/pack-[0-9a-f]{40}\\.idx$", get_idx_file},
718+
{"GET", "/objects/pack/pack-[0-9a-f]{64}\\.idx$", get_idx_file},
716719

717720
{"POST", "/git-upload-pack$", service_rpc},
718721
{"POST", "/git-receive-pack$", service_rpc}

0 commit comments

Comments
 (0)