@@ -87,6 +87,8 @@ void prepare_repo_settings(struct repository *r)
r->settings.fetch_negotiation_algorithm = FETCH_NEGOTIATION_NOOP;
else if (!strcasecmp(strval, "default"))
r->settings.fetch_negotiation_algorithm = FETCH_NEGOTIATION_DEFAULT;
+ else
+ die("unknown fetch negotiation algorithm '%s'", strval);
}
/*
@@ -971,6 +971,13 @@ test_expect_success 'same as last but with config overrides' '
-c fetch.negotiationAlgorithm=default
'
+test_expect_success 'ensure bogus fetch.negotiationAlgorithm yields error' '
+ test_when_finished rm -rf clientv0 &&
+ cp -r client clientv0 &&
+ test_must_fail git -C clientv0 --fetch.negotiationAlgorithm=bogus \
+ fetch origin server_has both_have_2
+'
+
test_expect_success 'filtering by size' '
rm -rf server client &&
test_create_repo server &&