diff options
| author | Patrick Steinhardt <ps@pks.im> | 2025-07-23 16:08:28 +0200 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-07-23 08:15:19 -0700 |
| commit | 627d08cca769999a7a9419b8aeaba26f61f551f5 (patch) | |
| tree | 0abdd07b61d7f6aaaef5acf8cb552b958e6f04b9 /merge-ort.c | |
| parent | config: drop `git_config_get_string_multi()` wrapper (diff) | |
| download | git-627d08cca769999a7a9419b8aeaba26f61f551f5.tar.gz git-627d08cca769999a7a9419b8aeaba26f61f551f5.zip | |
config: drop `git_config_get_string()` wrapper
In 036876a1067 (config: hide functions using `the_repository` by
default, 2024-08-13) we have moved around a bunch of functions in the
config subsystem that depend on `the_repository`. Those function have
been converted into mere wrappers around their equivalent function that
takes in a repository as parameter, and the intent was that we'll
eventually remove those wrappers to make the dependency on the global
repository variable explicit at the callsite.
Follow through with that intent and remove `git_config_get_string()`.
All callsites are adjusted so that they use
`repo_config_get_string(the_repository, ...)` instead. While some
callsites might already have a repository available, this mechanical
conversion is the exact same as the current situation and thus cannot
cause any regression. Those sites should eventually be cleaned up in a
later patch series.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'merge-ort.c')
| -rw-r--r-- | merge-ort.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/merge-ort.c b/merge-ort.c index 49aa37a8f2..29789579c9 100644 --- a/merge-ort.c +++ b/merge-ort.c @@ -5358,15 +5358,15 @@ static void merge_recursive_config(struct merge_options *opt, int ui) git_config_get_int("merge.renamelimit", &opt->rename_limit); git_config_get_bool("merge.renormalize", &renormalize); opt->renormalize = renormalize; - if (!git_config_get_string("diff.renames", &value)) { + if (!repo_config_get_string(the_repository, "diff.renames", &value)) { opt->detect_renames = git_config_rename("diff.renames", value); free(value); } - if (!git_config_get_string("merge.renames", &value)) { + if (!repo_config_get_string(the_repository, "merge.renames", &value)) { opt->detect_renames = git_config_rename("merge.renames", value); free(value); } - if (!git_config_get_string("merge.directoryrenames", &value)) { + if (!repo_config_get_string(the_repository, "merge.directoryrenames", &value)) { int boolval = git_parse_maybe_bool(value); if (0 <= boolval) { opt->detect_directory_renames = boolval ? @@ -5379,7 +5379,7 @@ static void merge_recursive_config(struct merge_options *opt, int ui) free(value); } if (ui) { - if (!git_config_get_string("diff.algorithm", &value)) { + if (!repo_config_get_string(the_repository, "diff.algorithm", &value)) { long diff_algorithm = parse_algorithm_value(value); if (diff_algorithm < 0) die(_("unknown value for config '%s': %s"), "diff.algorithm", value); |
