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

@ -726,7 +726,8 @@ int repo_config_get_expiry_in_days(struct repository *r, const char *key,
* dies printing the line number and the file name of the highest priority
* value for the configuration variable `key`.
*/
NORETURN void git_die_config(const char *key, const char *err, ...) __attribute__((format(printf, 2, 3)));
NORETURN void git_die_config(struct repository *r, const char *key, const char *err, ...)
__attribute__((format(printf, 3, 4)));
/**
* Helper function which formats the die error message according to the