repo-settings: fix error handling for unknown values
In commitaf3a67de01
("negotiator: unknown fetch.negotiationAlgorithm should error out", 2018-08-01), error handling for an unknown fetch.negotiationAlgorithm was added with the code die()ing. This was also added to the documentation for the fetch.negotiationAlgorithm option, to make it explicit that the code would die on unknown values. This behavior was lost with commitaaf633c2ad
("repo-settings: create feature.experimental setting", 2019-08-13). Restore it so that the behavior again matches the documentation. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
a68c5b9eba
commit
a9a136c232
@ -84,6 +84,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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user