config: pass repo to git_die_config()

Refactor `git_die_config()` to accept a `struct repository` such that we
can get rid of the implicit dependency on `the_repository`. Rename the
function accordingly.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Patrick Steinhardt
2024-08-13 11:14:07 +02:00
committed by Junio C Hamano
parent 44ebcd6254
commit 0c2c37d16b
4 changed files with 11 additions and 10 deletions

View File

@ -868,7 +868,7 @@ static int git_config_get_notes_strategy(const char *key,
if (git_config_get_string(key, &value))
return 1;
if (parse_notes_merge_strategy(value, strategy))
git_die_config(key, _("unknown notes merge strategy %s"), value);
git_die_config(the_repository, key, _("unknown notes merge strategy %s"), value);
free(value);
return 0;