Skip to content

Commit 48bf141

Browse files
bk2204gitster
authored andcommitted
fetch-pack: detect when the server doesn't support our hash
Detect when the server doesn't support our hash algorithm and abort. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 84eca27 commit 48bf141

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

fetch-pack.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1039,6 +1039,8 @@ static struct ref *do_fetch_pack(struct fetch_pack_args *args,
10391039
print_verbose(args, _("Server supports %s"), "deepen-relative");
10401040
else if (args->deepen_relative)
10411041
die(_("Server does not support --deepen"));
1042+
if (!server_supports_hash(the_hash_algo->name, NULL))
1043+
die(_("Server does not support this repository's object format"));
10421044

10431045
if (!args->no_dependents) {
10441046
mark_complete_and_common_ref(negotiator, args, &ref);

0 commit comments

Comments
 (0)