]> git.ipfire.org Git - thirdparty/git.git/commitdiff
config: drop `git_config()` wrapper
authorPatrick Steinhardt <ps@pks.im>
Wed, 23 Jul 2025 14:08:22 +0000 (16:08 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 23 Jul 2025 15:15:18 +0000 (08:15 -0700)
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()`. All callsites
are adjusted so that they use `repo_config(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>
118 files changed:
Documentation/user-manual.adoc
apply.c
archive-tar.c
archive-zip.c
archive.c
builtin/am.c
builtin/blame.c
builtin/branch.c
builtin/cat-file.c
builtin/check-attr.c
builtin/check-ignore.c
builtin/check-mailmap.c
builtin/checkout--worker.c
builtin/checkout.c
builtin/clean.c
builtin/clone.c
builtin/column.c
builtin/commit-graph.c
builtin/commit-tree.c
builtin/commit.c
builtin/config.c
builtin/count-objects.c
builtin/credential.c
builtin/describe.c
builtin/diff-files.c
builtin/diff-index.c
builtin/diff-tree.c
builtin/diff.c
builtin/fast-export.c
builtin/fast-import.c
builtin/fetch.c
builtin/fmt-merge-msg.c
builtin/fsck.c
builtin/fsmonitor--daemon.c
builtin/gc.c
builtin/grep.c
builtin/hash-object.c
builtin/help.c
builtin/hook.c
builtin/index-pack.c
builtin/interpret-trailers.c
builtin/log.c
builtin/ls-tree.c
builtin/merge-base.c
builtin/merge-file.c
builtin/merge-tree.c
builtin/merge.c
builtin/mktag.c
builtin/multi-pack-index.c
builtin/mv.c
builtin/name-rev.c
builtin/notes.c
builtin/pack-objects.c
builtin/patch-id.c
builtin/pull.c
builtin/push.c
builtin/range-diff.c
builtin/read-tree.c
builtin/rebase.c
builtin/receive-pack.c
builtin/reflog.c
builtin/refs.c
builtin/remote.c
builtin/repack.c
builtin/replace.c
builtin/rerere.c
builtin/reset.c
builtin/rev-list.c
builtin/rev-parse.c
builtin/rm.c
builtin/shortlog.c
builtin/show-branch.c
builtin/show-ref.c
builtin/sparse-checkout.c
builtin/stash.c
builtin/stripspace.c
builtin/submodule--helper.c
builtin/symbolic-ref.c
builtin/tag.c
builtin/unpack-file.c
builtin/unpack-objects.c
builtin/update-index.c
builtin/update-ref.c
builtin/var.c
builtin/verify-pack.c
builtin/worktree.c
builtin/write-tree.c
config.h
connect.c
contrib/coccinelle/config_fn_ctx.pending.cocci
convert.c
fetch-pack.c
fsck.h
gpg-interface.c
help.c
http-fetch.c
http.c
imap-send.c
ls-refs.c
merge-ll.c
merge-ort.c
notes-utils.c
notes.c
pretty.c
refs/reftable-backend.c
rerere.c
revision.c
scalar.c
sequencer.c
setup.c
t/helper/test-advise.c
t/helper/test-config.c
t/helper/test-read-cache.c
t/helper/test-userdiff.c
t/t4256/1/mailinfo.c
t/t4256/1/mailinfo.c.orig
trailer.c
transport.c

index 8d00a9e8229b9cd8a029acc2885854b23e8e8f4e..76969871176e5863967d7252d1ae07aa7dd76571 100644 (file)
@@ -4270,7 +4270,7 @@ So, look into `builtin/cat-file.c`, search for `cmd_cat_file()` and look what
 it does.
 
 ------------------------------------------------------------------
-        git_config(git_default_config);
+        repo_config(the_repository, git_default_config);
         if (argc != 3)
                usage("git cat-file [-t|-s|-e|-p|<type>] <sha1>");
         if (get_sha1(argv[2], sha1))
diff --git a/apply.c b/apply.c
index a3804316fbd11f73b623758fa28485a413b3b050..d2381a157c0a8342ae5e6997b25930f80b3f5b4d 100644 (file)
--- a/apply.c
+++ b/apply.c
@@ -50,7 +50,7 @@ static void git_apply_config(void)
 {
        git_config_get_string("apply.whitespace", &apply_default_whitespace);
        git_config_get_string("apply.ignorewhitespace", &apply_default_ignorewhitespace);
-       git_config(git_xmerge_config, NULL);
+       repo_config(the_repository, git_xmerge_config, NULL);
 }
 
 static int parse_whitespace_option(struct apply_state *state, const char *option)
index 249164ea77dc04ad6a15a3b7ad3798a6f89879bc..73b63ddc41bad6072aa68dcddb18f271791f1d8c 100644 (file)
@@ -537,7 +537,7 @@ void init_tar_archiver(void)
        tar_filter_config("tar.tgz.remote", "true", NULL);
        tar_filter_config("tar.tar.gz.command", internal_gzip_command, NULL);
        tar_filter_config("tar.tar.gz.remote", "true", NULL);
-       git_config(git_tar_config, NULL);
+       repo_config(the_repository, git_tar_config, NULL);
        for (i = 0; i < nr_tar_filters; i++) {
                /* omit any filters that never had a command configured */
                if (tar_filters[i]->filter_command)
index df8866d5bae28a1e555c8b0d95609bb92abc7a2c..dbd90d9c3d4b32b3fb0628789e448931c70ac0f7 100644 (file)
@@ -632,7 +632,7 @@ static int write_zip_archive(const struct archiver *ar UNUSED,
 {
        int err;
 
-       git_config(archive_zip_config, NULL);
+       repo_config(the_repository, archive_zip_config, NULL);
 
        dos_time(&args->time, &zip_date, &zip_time);
 
index f5a9d45c8d3e244c28fd72d5774fb987e396615f..2dd306a07a729041d39aafb9f9d0eb05d072e98b 100644 (file)
--- a/archive.c
+++ b/archive.c
@@ -761,7 +761,7 @@ int write_archive(int argc, const char **argv, const char *prefix,
        int rc;
 
        git_config_get_bool("uploadarchive.allowunreachable", &remote_allow_unreachable);
-       git_config(git_default_config, NULL);
+       repo_config(the_repository, git_default_config, NULL);
 
        describe_status.max_invocations = 1;
        ctx.date_mode.type = DATE_NORMAL;
index c9d925f7b96071090eb4e8143a33b287007fa639..a7e7cf1465aa19ad0e7b605bfc3f6be7a2e4cc0e 100644 (file)
@@ -2445,7 +2445,7 @@ int cmd_am(int argc,
 
        show_usage_with_options_if_asked(argc, argv, usage, options);
 
-       git_config(git_default_config, NULL);
+       repo_config(the_repository, git_default_config, NULL);
 
        am_state_init(&state);
 
index 91586e6852b09e88d80172178890af2a02b543b7..71efeb7c7e6ad7c1ce6a696daf6da404fdaa6c21 100644 (file)
@@ -947,7 +947,7 @@ int cmd_blame(int argc,
        const char *const *opt_usage = cmd_is_annotate ? annotate_opt_usage : blame_opt_usage;
 
        setup_default_color_by_age();
-       git_config(git_blame_config, &output_option);
+       repo_config(the_repository, git_blame_config, &output_option);
        repo_init_revisions(the_repository, &revs, NULL);
        revs.date_mode = blame_date_mode;
        revs.diffopt.flags.allow_textconv = 1;
index c150131bd9f1222e9ec9d319b717e6a0baba5dab..08e50bf77b3f5484ab0bbc2c3e660901e1f6e278 100644 (file)
@@ -791,7 +791,7 @@ int cmd_branch(int argc,
         * Try to set sort keys from config. If config does not set any,
         * fall back on default (refname) sorting.
         */
-       git_config(git_branch_config, &sorting_options);
+       repo_config(the_repository, git_branch_config, &sorting_options);
        if (!sorting_options.nr)
                string_list_append(&sorting_options, "refname");
 
index 2492a0b6f39ac3d372850aae66fd23be586c805e..b9eb2bb3b923ac8e7d93143b70068babb5c53bb0 100644 (file)
@@ -1095,7 +1095,7 @@ int cmd_cat_file(int argc,
                OPT_END()
        };
 
-       git_config(git_cat_file_config, NULL);
+       repo_config(the_repository, git_cat_file_config, NULL);
 
        batch.buffer_output = -1;
 
index 7cf275b8937958ae41947814ec2ccf6c808706cb..51ed48ce4370c3d3c22a936fe4d02e058f9b58f8 100644 (file)
@@ -119,7 +119,7 @@ int cmd_check_attr(int argc,
        if (!is_bare_repository())
                setup_work_tree();
 
-       git_config(git_default_config, NULL);
+       repo_config(the_repository, git_default_config, NULL);
 
        argc = parse_options(argc, argv, prefix, check_attr_options,
                             check_attr_usage, PARSE_OPT_KEEP_DASHDASH);
index 7b7831d13a85ff2f87698e444f2f9b3db745d429..03033499cb083247dc17737386cca304e5134b23 100644 (file)
@@ -159,7 +159,7 @@ int cmd_check_ignore(int argc,
        int num_ignored;
        struct dir_struct dir = DIR_INIT;
 
-       git_config(git_default_config, NULL);
+       repo_config(the_repository, git_default_config, NULL);
 
        argc = parse_options(argc, argv, prefix, check_ignore_options,
                             check_ignore_usage, 0);
index be2cebe12152e38d3bb8cf12948823c8d710bdda..634626c672848f052e1a0a42226236374580d32f 100644 (file)
@@ -56,7 +56,7 @@ int cmd_check_mailmap(int argc,
        int i;
        struct string_list mailmap = STRING_LIST_INIT_NODUP;
 
-       git_config(git_default_config, NULL);
+       repo_config(the_repository, git_default_config, NULL);
        argc = parse_options(argc, argv, prefix, check_mailmap_options,
                             check_mailmap_usage, 0);
        if (argc == 0 && !use_stdin)
index da9345a44b84de14743e28d947510afad8247c06..27a7d4f0409893b21c9fdcde4002fe3e2b1ef708 100644 (file)
@@ -132,7 +132,7 @@ int cmd_checkout__worker(int argc,
                                         checkout_worker_usage,
                                         checkout_worker_options);
 
-       git_config(git_default_config, NULL);
+       repo_config(the_repository, git_default_config, NULL);
        argc = parse_options(argc, argv, prefix, checkout_worker_options,
                             checkout_worker_usage, 0);
        if (argc > 0)
index 0a90b86a72913f2fb381159c7940ef4fe5e84b36..948ff7bdda7c17eeea648f6671d8fa2ff39a37a1 100644 (file)
@@ -1764,7 +1764,7 @@ static int checkout_main(int argc, const char **argv, const char *prefix,
        opts->prefix = prefix;
        opts->show_progress = -1;
 
-       git_config(git_checkout_config, opts);
+       repo_config(the_repository, git_checkout_config, opts);
        if (the_repository->gitdir) {
                prepare_repo_settings(the_repository);
                the_repository->settings.command_requires_full_index = 0;
index 053c94fc6bd12ac535a779b496f52b9547f95765..5ee147c4acc05334c02c8e485ae0bfa31f0f31f1 100644 (file)
@@ -949,7 +949,7 @@ int cmd_clean(int argc,
                OPT_END()
        };
 
-       git_config(git_clean_config, NULL);
+       repo_config(the_repository, git_clean_config, NULL);
 
        argc = parse_options(argc, argv, prefix, options, builtin_clean_usage,
                             0);
index 6d08abed37c4ce2190ada3658f72b247545ed07d..3c6d8529b6c3a3742c0bad14c8008b91cc3570ac 100644 (file)
@@ -1001,7 +1001,7 @@ int cmd_clone(int argc,
 
        packet_trace_identity("clone");
 
-       git_config(git_clone_config, NULL);
+       repo_config(the_repository, git_clone_config, NULL);
 
        argc = parse_options(argc, argv, prefix, builtin_clone_options,
                             builtin_clone_usage, 0);
@@ -1242,7 +1242,7 @@ int cmd_clone(int argc,
         * re-read config after init_db and write_config to pick up any config
         * injected by --template and --config, respectively.
         */
-       git_config(git_clone_config, NULL);
+       repo_config(the_repository, git_clone_config, NULL);
 
        /*
         * If option_reject_shallow is specified from CLI option,
index ce6443d5fac84d60e2bf906dfc91a8a86782216a..87dce3c6e53a19d9021539f5eb447f53c81af9bf 100644 (file)
@@ -42,9 +42,9 @@ int cmd_column(int argc,
        /* This one is special and must be the first one */
        if (argc > 1 && starts_with(argv[1], "--command=")) {
                command = argv[1] + 10;
-               git_config(column_config, (void *)command);
+               repo_config(the_repository, column_config, (void *)command);
        } else
-               git_config(column_config, NULL);
+               repo_config(the_repository, column_config, NULL);
 
        memset(&copts, 0, sizeof(copts));
        copts.padding = 1;
index 25018a0b9df4645829aea08d74c30d90f0b564b0..c5cc601844cce54e72481d4da42440fddad7e746 100644 (file)
@@ -265,7 +265,7 @@ static int graph_write(int argc, const char **argv, const char *prefix,
 
        trace2_cmd_mode("write");
 
-       git_config(git_commit_graph_write_config, &opts);
+       repo_config(the_repository, git_commit_graph_write_config, &opts);
 
        argc = parse_options(argc, argv, prefix,
                             options,
@@ -347,7 +347,7 @@ int cmd_commit_graph(int argc,
        };
        struct option *options = parse_options_concat(builtin_commit_graph_options, common_opts);
 
-       git_config(git_default_config, NULL);
+       repo_config(the_repository, git_default_config, NULL);
 
        disable_replace_refs();
        save_commit_buffer = 0;
index 31cfd9bd15d61574e913758adf0ea15feafee7d9..2f1df28d41394d072884f9eaa4efd9ae3feeaa8f 100644 (file)
@@ -125,7 +125,7 @@ int cmd_commit_tree(int argc,
        };
        int ret;
 
-       git_config(git_default_config, NULL);
+       repo_config(the_repository, git_default_config, NULL);
 
        show_usage_with_options_if_asked(argc, argv,
                                         commit_tree_usage, options);
index fba0dded64a718e5e19bcbe22d7b69bea31d7275..fcd829e04ec2ba08cd074e624b53421270ee4991 100644 (file)
@@ -207,9 +207,9 @@ static void status_init_config(struct wt_status *s, config_fn_t fn)
 {
        wt_status_prepare(the_repository, s);
        init_diff_ui_defaults();
-       git_config(fn, s);
+       repo_config(the_repository, fn, s);
        determine_whence(s);
-       s->hints = advice_enabled(ADVICE_STATUS_HINTS); /* must come after git_config() */
+       s->hints = advice_enabled(ADVICE_STATUS_HINTS); /* must come after repo_config() */
 }
 
 static void rollback_index_files(void)
index 5efe2730106c99accfd03344c160cae3e6efa513..af5d79eadc08040458a8bfb2d4e17f0bb3d5f4cb 100644 (file)
@@ -1091,7 +1091,7 @@ static int show_editor(struct config_location_options *opts)
                die(_("editing stdin is not supported"));
        if (opts->source.blob)
                die(_("editing blobs is not supported"));
-       git_config(git_default_config, NULL);
+       repo_config(the_repository, git_default_config, NULL);
        config_file = opts->source.file ?
                        xstrdup(opts->source.file) :
                        repo_git_path(the_repository, "config");
index f687647931e0e21189e75fdfeb20ad6b3fcb40ea..433daff805abf9d12b2038bfc401e2f227976117 100644 (file)
@@ -106,7 +106,7 @@ int cmd_count_objects(int argc,
                OPT_END(),
        };
 
-       git_config(git_default_config, NULL);
+       repo_config(the_repository, git_default_config, NULL);
 
        argc = parse_options(argc, argv, prefix, opts, count_objects_usage, 0);
        /* we do not take arguments other than flags for now */
index 2e11b15dde3e850ac10650b4e758527fe085111c..52f172e80cb4965ff070a7c5cff6342f7584f30f 100644 (file)
@@ -16,7 +16,7 @@ int cmd_credential(int argc,
        const char *op;
        struct credential c = CREDENTIAL_INIT;
 
-       git_config(git_default_config, NULL);
+       repo_config(the_repository, git_default_config, NULL);
 
        show_usage_if_asked(argc, argv, usage_msg);
        if (argc != 2)
index fbf305d76244874129dcd4d130506971ff57d213..d7dd8139dec4b698ebfa9d2841dbf56cb19d7d1c 100644 (file)
@@ -623,7 +623,7 @@ int cmd_describe(int argc,
                OPT_END(),
        };
 
-       git_config(git_default_config, NULL);
+       repo_config(the_repository, git_default_config, NULL);
        argc = parse_options(argc, argv, prefix, options, describe_usage, 0);
        if (abbrev < 0)
                abbrev = DEFAULT_ABBREV;
index 99b1749723bc674beb52b8b1bf2b7c03e01d6e31..ea91347ce23beb5b9802ade9418275e3282fd22a 100644 (file)
@@ -31,7 +31,7 @@ int cmd_diff_files(int argc,
 
        show_usage_if_asked(argc, argv, diff_files_usage);
 
-       git_config(git_diff_basic_config, NULL); /* no "diff" UI options */
+       repo_config(the_repository, git_diff_basic_config, NULL); /* no "diff" UI options */
 
        prepare_repo_settings(the_repository);
        the_repository->settings.command_requires_full_index = 0;
index 81c0bc8ed7c6bedb7138b21e7c2027aee8ff60e2..522dacfc4cf09739cc31d691c474d2f3b20b7665 100644 (file)
@@ -28,7 +28,7 @@ int cmd_diff_index(int argc,
 
        show_usage_if_asked(argc, argv, diff_cache_usage);
 
-       git_config(git_diff_basic_config, NULL); /* no "diff" UI options */
+       repo_config(the_repository, git_diff_basic_config, NULL); /* no "diff" UI options */
 
        prepare_repo_settings(the_repository);
        the_repository->settings.command_requires_full_index = 0;
index e31cc797fe1e6e5f1269ad7a37492141708fe11c..49dd4d00ebf1bcc644383ee99df3a9e05502b89b 100644 (file)
@@ -124,7 +124,7 @@ int cmd_diff_tree(int argc,
 
        show_usage_if_asked(argc, argv, diff_tree_usage);
 
-       git_config(git_diff_basic_config, NULL); /* no "diff" UI options */
+       repo_config(the_repository, git_diff_basic_config, NULL); /* no "diff" UI options */
 
        prepare_repo_settings(the_repository);
        the_repository->settings.command_requires_full_index = 0;
index eebffe36ccfb08a73898fbdf4cb3e53e7c449273..9a89e25a982abb22277e953edac0b3c5cafa224f 100644 (file)
@@ -486,7 +486,7 @@ int cmd_diff(int argc,
                repo_set_hash_algo(the_repository, GIT_HASH_DEFAULT);
 
        init_diff_ui_defaults();
-       git_config(git_diff_ui_config, NULL);
+       repo_config(the_repository, git_diff_ui_config, NULL);
        prefix = precompose_argv_prefix(argc, argv, prefix);
 
        repo_init_revisions(the_repository, &rev, prefix);
index 6a3a17a8cd913247a1d4dae75029c24ad5e7127d..17027b859e0caf1f38306d2793522e9d9610ab4b 100644 (file)
@@ -1327,7 +1327,7 @@ int cmd_fast_export(int argc,
                usage_with_options (fast_export_usage, options);
 
        /* we handle encodings */
-       git_config(git_default_config, NULL);
+       repo_config(the_repository, git_default_config, NULL);
 
        repo_init_revisions(the_repository, &revs, prefix);
        init_revision_sources(&revision_sources);
index b1389c59211a485d605f208945183a30d8a73e35..607441e921b38aa43ed5f42eeac37fa89d63f473 100644 (file)
@@ -3541,7 +3541,7 @@ static void git_pack_config(void)
        else if (!git_config_get_int("transfer.unpacklimit", &limit))
                unpack_limit = limit;
 
-       git_config(git_default_config, NULL);
+       repo_config(the_repository, git_default_config, NULL);
 }
 
 static const char fast_import_usage[] =
index 87a0cca7994ff337cd5f7d5c471410a4e3237764..ea447c453d148a1069f7522f34ae2eb8bbb3cdb1 100644 (file)
@@ -1995,7 +1995,7 @@ static int add_remote_or_group(const char *name, struct string_list *list)
        struct remote_group_data g;
        g.name = name; g.list = list;
 
-       git_config(get_remote_group, &g);
+       repo_config(the_repository, get_remote_group, &g);
        if (list->nr == prev_nr) {
                struct remote *remote = remote_get(name);
                if (!remote_is_configured(remote, 0))
@@ -2417,7 +2417,7 @@ int cmd_fetch(int argc,
                free(anon);
        }
 
-       git_config(git_fetch_config, &config);
+       repo_config(the_repository, git_fetch_config, &config);
        if (the_repository->gitdir) {
                prepare_repo_settings(the_repository);
                the_repository->settings.command_requires_full_index = 0;
index 3b6aac2cf7faab219ff171a5f5ae375349bfc1f7..edb93c0b3a31e3999ab51d917ccd4bb6163055cd 100644 (file)
@@ -53,7 +53,7 @@ int cmd_fmt_merge_msg(int argc,
        int ret;
        struct fmt_merge_msg_opts opts;
 
-       git_config(fmt_merge_msg_config, NULL);
+       repo_config(the_repository, fmt_merge_msg_config, NULL);
        argc = parse_options(argc, argv, prefix, options, fmt_merge_msg_usage,
                             0);
        if (argc > 0)
index 0084cf7400bd46ba7d8b72a908a67c3536abc907..0ec6ca06e3b083a9653aabbbde363c41ddd25e9f 100644 (file)
@@ -987,7 +987,7 @@ int cmd_fsck(int argc,
        if (name_objects)
                fsck_enable_object_names(&fsck_walk_options);
 
-       git_config(git_fsck_config, &fsck_obj_options);
+       repo_config(the_repository, git_fsck_config, &fsck_obj_options);
        prepare_repo_settings(the_repository);
 
        if (check_references)
index 0820e524f1a51717f962b0855ac616b2be0a8156..469c62b555bcde727ce204bc307b736983fd77d5 100644 (file)
@@ -1547,7 +1547,7 @@ int cmd_fsmonitor__daemon(int argc,
                OPT_END()
        };
 
-       git_config(fsmonitor_config, NULL);
+       repo_config(the_repository, fsmonitor_config, NULL);
 
        argc = parse_options(argc, argv, prefix, options,
                             builtin_fsmonitor__daemon_usage, 0);
index fab8f4dd4f7b6cc9b7c5c96d8b5647ece14b718a..d9e3b9d2ec3632e1425f02d50102160071aef46d 100644 (file)
@@ -228,7 +228,7 @@ static void gc_config(struct gc_config *cfg)
                cfg->repack_filter_to = owned;
        }
 
-       git_config(git_default_config, NULL);
+       repo_config(the_repository, git_default_config, NULL);
 }
 
 enum schedule_priority {
index 39273d9c0fd47de5e443a49b7b9ee4dab692c5ba..7982dda9a3b6829a72790cdd3da9ab7dacca6c1e 100644 (file)
@@ -1035,7 +1035,7 @@ int cmd_grep(int argc,
        grep_prefix = prefix;
 
        grep_init(&opt, the_repository);
-       git_config(grep_cmd_config, &opt);
+       repo_config(the_repository, grep_cmd_config, &opt);
 
        /*
         * If there is no -- then the paths must exist in the working
index ddf281413a652e07c693e386b79b6c2c5361fc98..c3ad1e91c96fd98a4e8ed2c8eecb5d4efb57a28b 100644 (file)
@@ -111,7 +111,7 @@ int cmd_hash_object(int argc,
                vpath = vpath_free;
        }
 
-       git_config(git_default_config, NULL);
+       repo_config(the_repository, git_default_config, NULL);
 
        if (stdin_paths) {
                if (hashstdin)
index c257079cebc3c09fb91f258c3b0148e2f204c0e7..d79ecd946a640cd8513cf0f8dc4f27007aa688bc 100644 (file)
@@ -210,7 +210,7 @@ static enum help_format parse_help_format(const char *format)
        if (!strcmp(format, "web") || !strcmp(format, "html"))
                return HELP_FORMAT_WEB;
        /*
-        * Please update _git_config() in git-completion.bash when you
+        * Please update _repo_config() in git-completion.bash when you
         * add new help formats.
         */
        die(_("unrecognized help format '%s'"), format);
@@ -706,7 +706,7 @@ int cmd_help(int argc,
        }
 
        setup_git_directory_gently(&nongit);
-       git_config(git_help_config, NULL);
+       repo_config(the_repository, git_help_config, NULL);
 
        if (parsed_help_format != HELP_FORMAT_NONE)
                help_format = parsed_help_format;
index 672d2e37e845a2118aca1c4417a837138c250590..044c27aa95dba6809bc59169efcabe6722bc3a63 100644 (file)
@@ -55,7 +55,7 @@ static int run(int argc, const char **argv, const char *prefix,
                strvec_push(&opt.args, argv[i]);
 
        /* Need to take into account core.hooksPath */
-       git_config(git_default_config, NULL);
+       repo_config(the_repository, git_default_config, NULL);
 
        hook_name = argv[0];
        if (!ignore_missing)
index 0a5c8a1ac858f77fdb128da5e8c08f9e0f5755f5..53f1a7cd71ec96f10e5b73f04833ae364455dca2 100644 (file)
@@ -1917,7 +1917,7 @@ int cmd_index_pack(int argc,
 
        reset_pack_idx_option(&opts);
        opts.flags |= WRITE_REV;
-       git_config(git_index_pack_config, &opts);
+       repo_config(the_repository, git_index_pack_config, &opts);
        if (prefix && chdir(prefix))
                die(_("Cannot come back to cwd"));
 
index 44d8ccddc9d8de3dc45096bec7edc0f3ff1fe5ee..3141c37b853ff06065f6b530ff962c9f87f06bd5 100644 (file)
@@ -220,7 +220,7 @@ int cmd_interpret_trailers(int argc,
                OPT_END()
        };
 
-       git_config(git_default_config, NULL);
+       repo_config(the_repository, git_default_config, NULL);
 
        argc = parse_options(argc, argv, prefix, options,
                             git_interpret_trailers_usage, 0);
index 24a57c20a410e4921ca055035258a3fa224813db..1bedc4ef3551e993ed515b387191bf16dc37e1e7 100644 (file)
@@ -659,10 +659,10 @@ int cmd_whatchanged(int argc,
 
        log_config_init(&cfg);
        init_diff_ui_defaults();
-       git_config(git_log_config, &cfg);
+       repo_config(the_repository, git_log_config, &cfg);
 
        repo_init_revisions(the_repository, &rev, prefix);
-       git_config(grep_config, &rev.grep_filter);
+       repo_config(the_repository, grep_config, &rev.grep_filter);
 
        rev.diff = 1;
        rev.simplify_history = 0;
@@ -790,7 +790,7 @@ int cmd_show(int argc,
 
        log_config_init(&cfg);
        init_diff_ui_defaults();
-       git_config(git_log_config, &cfg);
+       repo_config(the_repository, git_log_config, &cfg);
 
        if (the_repository->gitdir) {
                prepare_repo_settings(the_repository);
@@ -799,7 +799,7 @@ int cmd_show(int argc,
 
        memset(&match_all, 0, sizeof(match_all));
        repo_init_revisions(the_repository, &rev, prefix);
-       git_config(grep_config, &rev.grep_filter);
+       repo_config(the_repository, grep_config, &rev.grep_filter);
 
        rev.diff = 1;
        rev.always_show_header = 1;
@@ -907,11 +907,11 @@ int cmd_log_reflog(int argc,
 
        log_config_init(&cfg);
        init_diff_ui_defaults();
-       git_config(git_log_config, &cfg);
+       repo_config(the_repository, git_log_config, &cfg);
 
        repo_init_revisions(the_repository, &rev, prefix);
        init_reflog_walk(&rev.reflog_info);
-       git_config(grep_config, &rev.grep_filter);
+       repo_config(the_repository, grep_config, &rev.grep_filter);
 
        rev.verbose_header = 1;
        memset(&opt, 0, sizeof(opt));
@@ -952,10 +952,10 @@ int cmd_log(int argc,
 
        log_config_init(&cfg);
        init_diff_ui_defaults();
-       git_config(git_log_config, &cfg);
+       repo_config(the_repository, git_log_config, &cfg);
 
        repo_init_revisions(the_repository, &rev, prefix);
-       git_config(grep_config, &rev.grep_filter);
+       repo_config(the_repository, grep_config, &rev.grep_filter);
 
        rev.always_show_header = 1;
        memset(&opt, 0, sizeof(opt));
@@ -2158,9 +2158,9 @@ int cmd_format_patch(int argc,
        format_config_init(&cfg);
        init_diff_ui_defaults();
        init_display_notes(&cfg.notes_opt);
-       git_config(git_format_config, &cfg);
+       repo_config(the_repository, git_format_config, &cfg);
        repo_init_revisions(the_repository, &rev, prefix);
-       git_config(grep_config, &rev.grep_filter);
+       repo_config(the_repository, grep_config, &rev.grep_filter);
 
        rev.show_notes = cfg.show_notes;
        memcpy(&rev.notes_opt, &cfg.notes_opt, sizeof(cfg.notes_opt));
index 4d616dd52827d90ab141f09d1e2ad6429fe3198b..4ba84e519672d329b3834a7f6007c939236d432d 100644 (file)
@@ -375,7 +375,7 @@ int cmd_ls_tree(int argc,
        struct object_context obj_context = {0};
        int ret;
 
-       git_config(git_default_config, NULL);
+       repo_config(the_repository, git_default_config, NULL);
 
        argc = parse_options(argc, argv, prefix, ls_tree_options,
                             ls_tree_usage, 0);
index 123c81515e1f5f12045e4073f78b6e8a2b04bb4b..8fde35c1751ee1e04c809a08891231a1fc23a1d8 100644 (file)
@@ -167,7 +167,7 @@ int cmd_merge_base(int argc,
                OPT_END()
        };
 
-       git_config(git_default_config, NULL);
+       repo_config(the_repository, git_default_config, NULL);
        argc = parse_options(argc, argv, prefix, options, merge_base_usage, 0);
 
        if (cmdmode == 'a') {
index 9464f2756299ec253673980c766e01783d5edd89..3da4ca2c8cfe5924a9e26c7aef609f86d36e232e 100644 (file)
@@ -97,7 +97,7 @@ int cmd_merge_file(int argc,
 
        if (startup_info->have_repository) {
                /* Read the configuration file */
-               git_config(git_xmerge_config, NULL);
+               repo_config(the_repository, git_xmerge_config, NULL);
                if (0 <= git_xmerge_style)
                        xmp.style = git_xmerge_style;
        }
index cf8b06cadc7d5095979c6926ba493aef599326fb..99a6495fd52f79e494cd2c853b1798c5d444342b 100644 (file)
@@ -683,7 +683,7 @@ int cmd_merge_tree(int argc,
        if (argc != expected_remaining_argc)
                usage_with_options(merge_tree_usage, mt_options);
 
-       git_config(git_default_config, NULL);
+       repo_config(the_repository, git_default_config, NULL);
 
        /* Do the relevant type of merge */
        if (o.mode == MODE_REAL)
index 18b22c0a26d6337a7c68075326c2367f5cfe5986..dc4cb8fb14dbf314ecc3248ff27c4039101c7466 100644 (file)
@@ -1392,7 +1392,7 @@ int cmd_merge(int argc,
                skip_prefix(branch, "refs/heads/", &branch);
 
        init_diff_ui_defaults();
-       git_config(git_merge_config, NULL);
+       repo_config(the_repository, git_merge_config, NULL);
 
        if (!branch || is_null_oid(&head_oid))
                head_commit = NULL;
index 27e649736cf48c29437d5c65cd5a079f586bcab5..e078c97d032d95488af438fa9cdfd70108dc63f9 100644 (file)
@@ -98,7 +98,7 @@ int cmd_mktag(int argc,
        fsck_set_msg_type_from_ids(&fsck_options, FSCK_MSG_EXTRA_HEADER_ENTRY,
                                   FSCK_WARN);
        /* config might set fsck.extraHeaderEntry=* again */
-       git_config(git_fsck_config, &fsck_options);
+       repo_config(the_repository, git_fsck_config, &fsck_options);
        if (fsck_tag_standalone(NULL, buf.buf, buf.len, &fsck_options,
                                &tagged_oid, &tagged_type))
                die(_("tag on stdin did not pass our strict fsck check"));
index aa25b06f9d0f89b652aff548f05ea6505970cc4c..9a113f0f1f33ceb819bd6eda8eb3980d9f9ac086 100644 (file)
@@ -143,7 +143,7 @@ static int cmd_multi_pack_index_write(int argc, const char **argv,
 
        opts.flags |= MIDX_WRITE_BITMAP_HASH_CACHE;
 
-       git_config(git_multi_pack_index_write_config, NULL);
+       repo_config(the_repository, git_multi_pack_index_write_config, NULL);
 
        options = add_common_options(builtin_multi_pack_index_write_options);
 
@@ -290,7 +290,7 @@ int cmd_multi_pack_index(int argc,
 
        disable_replace_refs();
 
-       git_config(git_default_config, NULL);
+       repo_config(the_repository, git_default_config, NULL);
 
        if (the_repository &&
            the_repository->objects &&
index 07548fe96aeb49d15023134cc5ae36ea64bcd6c9..d43925097b420f0eb03941a20086be0c9a5b4094 100644 (file)
@@ -239,7 +239,7 @@ int cmd_mv(int argc,
        struct strbuf pathbuf = STRBUF_INIT;
        int ret;
 
-       git_config(git_default_config, NULL);
+       repo_config(the_repository, git_default_config, NULL);
 
        argc = parse_options(argc, argv, prefix, builtin_mv_options,
                             builtin_mv_usage, 0);
index ff199638deebf7e318acbf946ac67d4466fe00c6..74512e54a38c45d37d73de0fd9e3aa861dcb757d 100644 (file)
@@ -600,7 +600,7 @@ int cmd_name_rev(int argc,
 
        mem_pool_init(&string_pool, 0);
        init_commit_rev_name(&rev_names);
-       git_config(git_default_config, NULL);
+       repo_config(the_repository, git_default_config, NULL);
        argc = parse_options(argc, argv, prefix, opts, name_rev_usage, 0);
 
 #ifndef WITH_BREAKING_CHANGES
index a9529b1696ae14174580795fbd71e5285b028eb5..17004cdb10eb75c3675b67c2edc517fb87277438 100644 (file)
@@ -1145,7 +1145,7 @@ int cmd_notes(int argc,
                OPT_END()
        };
 
-       git_config(git_default_config, NULL);
+       repo_config(the_repository, git_default_config, NULL);
        argc = parse_options(argc, argv, prefix, options, git_notes_usage,
                             PARSE_OPT_SUBCOMMAND_OPTIONAL);
        if (!fn) {
index 5781dec9808273a4db0387a3aa758801aee2e249..8c86ec2d89fddb8497da869f6ac7472999af61df 100644 (file)
@@ -4924,7 +4924,7 @@ int cmd_pack_objects(int argc,
 
        reset_pack_idx_option(&pack_idx_opts);
        pack_idx_opts.flags |= WRITE_REV;
-       git_config(git_pack_config, NULL);
+       repo_config(the_repository, git_pack_config, NULL);
        if (git_env_bool(GIT_TEST_NO_WRITE_REV_INDEX, 0))
                pack_idx_opts.flags &= ~WRITE_REV;
 
index 26f04b0335da7e3a5d4da6ab0eb4f216f10d4793..a659f00531a0f45a133a85f5c07a6676415b7812 100644 (file)
@@ -235,7 +235,7 @@ int cmd_patch_id(int argc,
                OPT_END()
        };
 
-       git_config(git_patch_id_config, &config);
+       repo_config(the_repository, git_patch_id_config, &config);
 
        /* verbatim implies stable */
        if (config.verbatim)
index c593f324fe7f1d849fb11fe3d6b30d2789a29ca3..d13ed9b5176c24e554c1c264270a6ccfaa65d813 100644 (file)
@@ -999,7 +999,7 @@ int cmd_pull(int argc,
        if (!getenv("GIT_REFLOG_ACTION"))
                set_reflog_message(argc, argv);
 
-       git_config(git_pull_config, NULL);
+       repo_config(the_repository, git_pull_config, NULL);
        if (the_repository->gitdir) {
                prepare_repo_settings(the_repository);
                the_repository->settings.command_requires_full_index = 0;
index 92d530e5c4dff07e7fecd439f7aaef9721fd780f..d0794b7b305c873d3dd4b5758e2ee49a605749f7 100644 (file)
@@ -598,7 +598,7 @@ int cmd_push(int argc,
        };
 
        packet_trace_identity("push");
-       git_config(git_push_config, &flags);
+       repo_config(the_repository, git_push_config, &flags);
        argc = parse_options(argc, argv, prefix, options, push_usage, 0);
        push_options = (push_options_cmdline.nr
                ? &push_options_cmdline
index 32ddb6613fb4432ae4f84071893edf50df7e393d..a563abff5fee9bc332c66a261176b9fd82921fbd 100644 (file)
@@ -54,7 +54,7 @@ int cmd_range_diff(int argc,
        struct object_id oid;
        const char *three_dots = NULL;
 
-       git_config(git_diff_ui_config, NULL);
+       repo_config(the_repository, git_diff_ui_config, NULL);
 
        repo_diff_setup(the_repository, &diffopt);
 
index a8f352f7cd9b1097a3ecb92494207cc39467c666..00eef756e67b0c853eb14771d698ed28ed2fc655 100644 (file)
@@ -168,7 +168,7 @@ int cmd_read_tree(int argc,
        opts.src_index = the_repository->index;
        opts.dst_index = the_repository->index;
 
-       git_config(git_read_tree_config, NULL);
+       repo_config(the_repository, git_read_tree_config, NULL);
 
        argc = parse_options(argc, argv, cmd_prefix, read_tree_options,
                             read_tree_usage, 0);
index e90562a3b8a84e397dccf6eb28d5dce022e14ac9..0c3daa4b8140d88dc1a42b24cb1e227c945f71b3 100644 (file)
@@ -1245,7 +1245,7 @@ int cmd_rebase(int argc,
        prepare_repo_settings(the_repository);
        the_repository->settings.command_requires_full_index = 0;
 
-       git_config(rebase_config, &options);
+       repo_config(the_repository, rebase_config, &options);
        /* options.gpg_sign_opt will be either "-S" or NULL */
        gpg_sign = options.gpg_sign_opt ? "" : NULL;
        FREE_AND_NULL(options.gpg_sign_opt);
index 7974d157eb92408e2be4264c4885fed605829d6f..82d516a42c46b6621b68a0033c3cd4318871257e 100644 (file)
@@ -2613,7 +2613,7 @@ int cmd_receive_pack(int argc,
        if (!enter_repo(service_dir, 0))
                die("'%s' does not appear to be a git repository", service_dir);
 
-       git_config(receive_pack_config, NULL);
+       repo_config(the_repository, receive_pack_config, NULL);
        if (cert_nonce_seed)
                push_cert_nonce = prepare_push_cert_nonce(service_dir, time(NULL));
 
index 3acaf3e32c2714ad84855079bde28f35ea0d6995..4312f3d34c93f8eee103c5b949b720f38d04d998 100644 (file)
@@ -202,7 +202,7 @@ static int cmd_reflog_expire(int argc, const char **argv, const char *prefix,
                OPT_END()
        };
 
-       git_config(reflog_expire_config, &opts);
+       repo_config(the_repository, reflog_expire_config, &opts);
 
        save_commit_buffer = 0;
        do_all = status = 0;
index 998d2a2c1cc4e39431bdec2a2dbfe3a3d8fda636..c7ad0a2963a3d1eccd20e4e30723a57ee4c13745 100644 (file)
@@ -88,7 +88,7 @@ static int cmd_refs_verify(int argc, const char **argv, const char *prefix,
        if (argc)
                usage(_("'git refs verify' takes no arguments"));
 
-       git_config(git_fsck_config, &fsck_refs_options);
+       repo_config(the_repository, git_fsck_config, &fsck_refs_options);
        prepare_repo_settings(the_repository);
 
        worktrees = get_worktrees_without_reading_head();
index 18843b6bf6ccb576d1c4c76a68ee2e89857dcdcf..ebd70bea3a186da4538bf2c520cd5f0c1aec5171 100644 (file)
@@ -353,7 +353,7 @@ static void read_branches(void)
 {
        if (branch_list.nr)
                return;
-       git_config(config_read_branches, NULL);
+       repo_config(the_repository, config_read_branches, NULL);
 }
 
 struct ref_states {
@@ -690,7 +690,7 @@ static void handle_push_default(const char* old_name, const char* new_name)
                .origin = STRBUF_INIT,
                .linenr = -1,
        };
-       git_config(config_read_push_default, &push_default);
+       repo_config(the_repository, config_read_push_default, &push_default);
        if (push_default.scope >= CONFIG_SCOPE_COMMAND)
                ; /* pass */
        else if (push_default.scope >= CONFIG_SCOPE_LOCAL) {
@@ -1620,7 +1620,7 @@ static int update(int argc, const char **argv, const char *prefix,
                strvec_push(&cmd.args, argv[i]);
 
        if (strcmp(cmd.args.v[cmd.args.nr-1], "default") == 0) {
-               git_config(get_remote_default, &default_defined);
+               repo_config(the_repository, get_remote_default, &default_defined);
                if (!default_defined) {
                        strvec_pop(&cmd.args);
                        strvec_push(&cmd.args, "--all");
index b05ffe4623981e70ffae9fa634f1273afa5a4309..dd1db282dacf27b15a9c75962cb838b0668ad66a 100644 (file)
@@ -1230,7 +1230,7 @@ int cmd_repack(int argc,
 
        list_objects_filter_init(&po_args.filter_options);
 
-       git_config(repack_config, &cruft_po_args);
+       repo_config(the_repository, repack_config, &cruft_po_args);
 
        argc = parse_options(argc, argv, prefix, builtin_repack_options,
                                git_repack_usage, 0);
index 5ff2ab723cbd58eca7b9b263deff156fcee38639..3fe39e9df731dff4c166fc431bed853666a4d73a 100644 (file)
@@ -574,7 +574,7 @@ int cmd_replace(int argc,
        };
 
        disable_replace_refs();
-       git_config(git_default_config, NULL);
+       repo_config(the_repository, git_default_config, NULL);
 
        argc = parse_options(argc, argv, prefix, options, git_replace_usage, 0);
 
index 1312e79d89f38ebb9dd4bce59cfbda87c20c2e88..a056cb791b4c8075d900d2e175ed85a379bdc9bf 100644 (file)
@@ -66,7 +66,7 @@ int cmd_rerere(int argc,
 
        argc = parse_options(argc, argv, prefix, options, rerere_usage, 0);
 
-       git_config(git_xmerge_config, NULL);
+       repo_config(the_repository, git_xmerge_config, NULL);
 
        if (autoupdate == 1)
                flags = RERERE_AUTOUPDATE;
index dc50ffc1ac59e848ce0f04654c7577d76f9c0336..00492c19b060253f50f53b3899e3413f15d25216 100644 (file)
@@ -377,7 +377,7 @@ int cmd_reset(int argc,
                OPT_END()
        };
 
-       git_config(git_reset_config, NULL);
+       repo_config(the_repository, git_reset_config, NULL);
 
        argc = parse_options(argc, argv, prefix, options, git_reset_usage,
                                                PARSE_OPT_KEEP_DASHDASH);
index 4d0c460f1862dbc2ff46a3697a1112a690831d18..034ea0a558acab3a10b6cbd7ec1a839a97bb3a99 100644 (file)
@@ -636,7 +636,7 @@ int cmd_rev_list(int argc,
 
        show_usage_if_asked(argc, argv, rev_list_usage);
 
-       git_config(git_default_config, NULL);
+       repo_config(the_repository, git_default_config, NULL);
        repo_init_revisions(the_repository, &revs, prefix);
        revs.abbrev = DEFAULT_ABBREV;
        revs.commit_format = CMIT_FMT_UNSPECIFIED;
index 490da33beccf72690ef61a092c957646ee639e9e..44ff1b8342acaea76d7d001075aaa7ea19cf1b53 100644 (file)
@@ -734,7 +734,7 @@ int cmd_rev_parse(int argc,
        /* No options; just report on whether we're in a git repo or not. */
        if (argc == 1) {
                setup_git_directory();
-               git_config(git_default_config, NULL);
+               repo_config(the_repository, git_default_config, NULL);
                return 0;
        }
 
@@ -769,7 +769,7 @@ int cmd_rev_parse(int argc,
                /* The rest of the options require a git repository. */
                if (!did_repo_setup) {
                        prefix = setup_git_directory();
-                       git_config(git_default_config, NULL);
+                       repo_config(the_repository, git_default_config, NULL);
                        did_repo_setup = 1;
 
                        prepare_repo_settings(the_repository);
index a6565a69cfca879f7494fd546bb37a4a197f8e20..8c0da7a3ce7a66bfc37213513131b60931ad0faa 100644 (file)
@@ -271,7 +271,7 @@ int cmd_rm(int argc,
        struct pathspec pathspec;
        char *seen;
 
-       git_config(git_default_config, NULL);
+       repo_config(the_repository, git_default_config, NULL);
 
        argc = parse_options(argc, argv, prefix, builtin_rm_options,
                             builtin_rm_usage, 0);
index 60adc5e7a568f972620b56e66f94697b54a9d2f0..b91acf45c8fe59a5ffe5c52df0cee2d3373e9d57 100644 (file)
@@ -421,7 +421,7 @@ int cmd_shortlog(int argc,
        if (nongit && !the_hash_algo)
                repo_set_hash_algo(the_repository, GIT_HASH_DEFAULT);
 
-       git_config(git_default_config, NULL);
+       repo_config(the_repository, git_default_config, NULL);
        shortlog_init(&log);
        repo_init_revisions(the_repository, &rev, prefix);
        parse_options_start(&ctx, argc, argv, prefix, options,
index 525b231d87e1d9e0580d1988bb2400c18067ff81..1ab7db9d2ca8cf01bc91169c361e09f414997380 100644 (file)
@@ -710,7 +710,7 @@ int cmd_show_branch(int ac,
 
        init_commit_name_slab(&name_slab);
 
-       git_config(git_show_branch_config, NULL);
+       repo_config(the_repository, git_show_branch_config, NULL);
 
        /* If nothing is specified, try the default first */
        if (ac == 1 && default_args.nr) {
index 117709cb076ab37d4aa3d3e88a0dd29cbe564896..414e55b92d5fef50d0fc7648cb3c4a0ec2c667ea 100644 (file)
@@ -324,7 +324,7 @@ struct repository *repo UNUSED)
                OPT_END()
        };
 
-       git_config(git_default_config, NULL);
+       repo_config(the_repository, git_default_config, NULL);
 
        argc = parse_options(argc, argv, prefix, show_ref_options,
                             show_ref_usage, 0);
index 1bf01591b27523124a5894f8f777bb9ad740803a..8c333b3e2e145bcc5f8329eae9f6fb0cd0cbbe25 100644 (file)
@@ -1082,7 +1082,7 @@ int cmd_sparse_checkout(int argc,
                             builtin_sparse_checkout_options,
                             builtin_sparse_checkout_usage, 0);
 
-       git_config(git_default_config, NULL);
+       repo_config(the_repository, git_default_config, NULL);
 
        prepare_repo_settings(the_repository);
        the_repository->settings.command_requires_full_index = 0;
index e2f95cc2ebc219894ead5deea0807c0288cc4eec..821b58a14e578c862f55588d08756f6c7bf36e97 100644 (file)
@@ -979,7 +979,7 @@ static int show_stash(int argc, const char **argv, const char *prefix,
        int do_usage = 0;
 
        init_diff_ui_defaults();
-       git_config(git_diff_ui_config, NULL);
+       repo_config(the_repository, git_diff_ui_config, NULL);
        repo_init_revisions(the_repository, &rev, prefix);
 
        argc = parse_options(argc, argv, prefix, options, git_stash_show_usage,
@@ -2358,7 +2358,7 @@ int cmd_stash(int argc,
        const char **args_copy;
        int ret;
 
-       git_config(git_stash_config, NULL);
+       repo_config(the_repository, git_stash_config, NULL);
 
        argc = parse_options(argc, argv, prefix, options, git_stash_usage,
                             PARSE_OPT_SUBCOMMAND_OPTIONAL |
index e147f3ff92c37afe79a26808b5dfd83476fc3366..4a566cbc5de672fd25c96494287c001908a6a984 100644 (file)
@@ -55,7 +55,7 @@ int cmd_stripspace(int argc,
 
        if (mode == STRIP_COMMENTS || mode == COMMENT_LINES) {
                setup_git_directory_gently(&nongit);
-               git_config(git_default_config, NULL);
+               repo_config(the_repository, git_default_config, NULL);
        }
 
        if (strbuf_read(&buf, 0, 1024) < 0)
index d8a6fa47e59214adcd1832c377eea98fde70781b..89ee09abea6f5d788394c788c8ed9eea7b9956d9 100644 (file)
@@ -649,7 +649,7 @@ static void status_submodule(const char *path, const struct object_id *ce_oid,
                     "--ignore-submodules=dirty", "--quiet", "--",
                     path, NULL);
 
-       git_config(git_diff_basic_config, NULL);
+       repo_config(the_repository, git_diff_basic_config, NULL);
 
        repo_init_revisions(the_repository, &rev, NULL);
        rev.abbrev = 0;
@@ -1108,7 +1108,7 @@ static int compute_summary_module_list(struct object_id *head_oid,
        if (info->argc)
                strvec_pushv(&diff_args, info->argv);
 
-       git_config(git_diff_basic_config, NULL);
+       repo_config(the_repository, git_diff_basic_config, NULL);
        repo_init_revisions(the_repository, &rev, info->prefix);
        rev.abbrev = 0;
        precompose_argv_prefix(diff_args.nr, diff_args.v, NULL);
@@ -2830,7 +2830,7 @@ static int module_update(int argc, const char **argv, const char *prefix,
        };
 
        update_clone_config_from_gitmodules(&opt.max_jobs);
-       git_config(git_update_clone_config, &opt.max_jobs);
+       repo_config(the_repository, git_update_clone_config, &opt.max_jobs);
 
        argc = parse_options(argc, argv, prefix, module_update_options,
                             git_submodule_helper_usage, 0);
@@ -3128,7 +3128,7 @@ static int module_create_branch(int argc, const char **argv, const char *prefix,
                NULL
        };
 
-       git_config(git_default_config, NULL);
+       repo_config(the_repository, git_default_config, NULL);
        track = git_branch_track;
        argc = parse_options(argc, argv, prefix, options, usage, 0);
 
index 299d23d76a83f3962bd00e7f8d515bb8438bff3d..5c4623067c53729db325ce1ee7f1be2a15696239 100644 (file)
@@ -59,7 +59,7 @@ int cmd_symbolic_ref(int argc,
                OPT_END(),
        };
 
-       git_config(git_default_config, NULL);
+       repo_config(the_repository, git_default_config, NULL);
        argc = parse_options(argc, argv, prefix, options,
                             git_symbolic_ref_usage, 0);
        if (msg && !*msg)
index 46cbf892e34224ad2e8557ee2c20d55bb1e14a5a..25f30e3f9beb1d25c5b884079d1911b0f033f406 100644 (file)
@@ -546,7 +546,7 @@ int cmd_tag(int argc,
         * Try to set sort keys from config. If config does not set any,
         * fall back on default (refname) sorting.
         */
-       git_config(git_tag_config, &sorting_options);
+       repo_config(the_repository, git_tag_config, &sorting_options);
        if (!sorting_options.nr)
                string_list_append(&sorting_options, "refname");
 
index 4360872ae070267bdf00dff06c8f86718f8a6c22..ae871adc909074bc4f16f71bbc7704a65a937ea4 100644 (file)
@@ -43,7 +43,7 @@ int cmd_unpack_file(int argc,
        if (repo_get_oid(the_repository, argv[1], &oid))
                die("Not a valid object name %s", argv[1]);
 
-       git_config(git_default_config, NULL);
+       repo_config(the_repository, git_default_config, NULL);
 
        puts(create_temp_file(&oid));
        return 0;
index a69d59eb50c90251a98430c7b3d069a3b9d0a552..26aa885da92c85c345c931bfb1fad2037beb3b23 100644 (file)
@@ -621,7 +621,7 @@ int cmd_unpack_objects(int argc,
 
        disable_replace_refs();
 
-       git_config(git_default_config, NULL);
+       repo_config(the_repository, git_default_config, NULL);
 
        quiet = !isatty(2);
 
index 0c1d4ed55beb0870061bf6f6e0114c90aa4f033e..2380f3ccd68c8ce0ac4b221dbf84f18b9a430811 100644 (file)
@@ -1103,7 +1103,7 @@ int cmd_update_index(int argc,
        show_usage_with_options_if_asked(argc, argv,
                                         update_index_usage, options);
 
-       git_config(git_default_config, NULL);
+       repo_config(the_repository, git_default_config, NULL);
 
        prepare_repo_settings(r);
        the_repository->settings.command_requires_full_index = 0;
index 1e6131e04ad7455a11b6dc5b83f392311278e85c..cb9366432430883b06d21c9973c5d847bc6a0f15 100644 (file)
@@ -769,7 +769,7 @@ int cmd_update_ref(int argc,
                OPT_END(),
        };
 
-       git_config(git_default_config, NULL);
+       repo_config(the_repository, git_default_config, NULL);
        argc = parse_options(argc, argv, prefix, options, git_update_ref_usage,
                             0);
        if (msg && !*msg)
index ada642a9fe5257ed00454ecae769d023661cae74..beeac12dccf3eaade85d906cdc9295738f3be852 100644 (file)
@@ -226,11 +226,11 @@ int cmd_var(int argc,
                usage(var_usage);
 
        if (strcmp(argv[1], "-l") == 0) {
-               git_config(show_config, NULL);
+               repo_config(the_repository, show_config, NULL);
                list_vars();
                return 0;
        }
-       git_config(git_default_config, NULL);
+       repo_config(the_repository, git_default_config, NULL);
 
        git_var = get_git_var(argv[1]);
        if (!git_var)
index 34e4ed715f3e8e1eba31bb88b048b274b7ac1703..d9f66f5e76777658029eb92f32612828d3d14b48 100644 (file)
@@ -81,7 +81,7 @@ int cmd_verify_pack(int argc,
                OPT_END()
        };
 
-       git_config(git_default_config, NULL);
+       repo_config(the_repository, git_default_config, NULL);
        argc = parse_options(argc, argv, prefix, verify_pack_options,
                             verify_pack_usage, 0);
        if (argc < 1)
index 2dceeeed8bd03cd06c1d16f90d0741862abbcef8..b1306248dec80bcf25f0f24cea6f26fde8f8968f 100644 (file)
@@ -1448,7 +1448,7 @@ int cmd_worktree(int ac,
                OPT_END()
        };
 
-       git_config(git_worktree_config, NULL);
+       repo_config(the_repository, git_worktree_config, NULL);
 
        if (!prefix)
                prefix = "";
index cfec044710a56abe1e6f3eb58fcdc178365bb674..3465c70a48a7ebf8119ae0a5947fc577dcd6b9c5 100644 (file)
@@ -43,7 +43,7 @@ int cmd_write_tree(int argc,
                OPT_END()
        };
 
-       git_config(git_default_config, NULL);
+       repo_config(the_repository, git_default_config, NULL);
        argc = parse_options(argc, argv, cmd_prefix, write_tree_options,
                             write_tree_usage, 0);
 
index 29a027748375f1fedf31384ada7a3f70a435aa4c..6b729fc6bbfb2e972e4464996c9e247d2ddf4687 100644 (file)
--- a/config.h
+++ b/config.h
@@ -719,11 +719,6 @@ NORETURN void git_die_config_linenr(const char *key, const char *filename, int l
 int lookup_config(const char **mapping, int nr_mapping, const char *var);
 
 # ifdef USE_THE_REPOSITORY_VARIABLE
-static inline void git_config(config_fn_t fn, void *data)
-{
-       repo_config(the_repository, fn, data);
-}
-
 static inline void git_config_clear(void)
 {
        repo_config_clear(the_repository);
index e77287f426cdfd4c7fae62c8a4a8b82d8c06dfa7..4b1dc65e5cef1b35efbf6a7c0c7237c26d5863f4 100644 (file)
--- a/connect.c
+++ b/connect.c
@@ -1028,7 +1028,7 @@ static int git_proxy_command_options(const char *var, const char *value,
 static int git_use_proxy(const char *host)
 {
        git_proxy_command = getenv("GIT_PROXY_COMMAND");
-       git_config(git_proxy_command_options, (void*)host);
+       repo_config(the_repository, git_proxy_command_options, (void*)host);
        return (git_proxy_command && *git_proxy_command);
 }
 
index 6d3d1000a9657d5ec6b685cc0017269985892bfb..54f09fcbcde486a0afa78d87e74efa642d13eee5 100644 (file)
@@ -83,7 +83,7 @@ int fn(const char *C1, const char *C2,
 
 
 // The previous rules don't catch all callbacks, especially if they're defined
-// in a separate file from the git_config() call. Fix these manually.
+// in a separate file from the repo_config() call. Fix these manually.
 @@
 identifier C1, C2, D;
 attribute name UNUSED;
index b5f7cf6306c3c3ef3cfec1a5169acc2b8a0d89a8..c7d6a85c226db7377eaaf8b82281234109129b47 100644 (file)
--- a/convert.c
+++ b/convert.c
@@ -1326,7 +1326,7 @@ void convert_attrs(struct index_state *istate,
                                         "eol", "text", "working-tree-encoding",
                                         NULL);
                user_convert_tail = &user_convert;
-               git_config(read_convert_config, NULL);
+               repo_config(the_repository, read_convert_config, NULL);
        }
 
        git_check_attr(istate, path, check);
index 01d3699c4b7fbe69c3f1f98b1debea51b3bb9dbe..11344206f73ce8cf1232a1e4861885319cee8874 100644 (file)
@@ -1916,7 +1916,7 @@ static void fetch_pack_config(void)
                }
        }
 
-       git_config(fetch_pack_config_cb, NULL);
+       repo_config(the_repository, fetch_pack_config_cb, NULL);
 }
 
 static void fetch_pack_setup(void)
diff --git a/fsck.h b/fsck.h
index 0c5869ac34e216807c2d4a88a4207064f193036a..dd7df3d5b3651b5f4e3e5b7fa23d6c2f3a0a066f 100644 (file)
--- a/fsck.h
+++ b/fsck.h
@@ -287,7 +287,7 @@ const char *fsck_describe_object(struct fsck_options *options,
 
 struct key_value_info;
 /*
- * git_config() callback for use by fsck-y tools that want to support
+ * repo_config() callback for use by fsck-y tools that want to support
  * fsck.<msg> fsck.skipList etc.
  */
 int git_fsck_config(const char *var, const char *value,
index bdcc8c2a2ed68315ae1d7e0d6c57faf787341dbe..bc0c21ebab1712971ef040d06e5b29baedc49eb3 100644 (file)
@@ -25,7 +25,7 @@ static void gpg_interface_lazy_init(void)
        if (done)
                return;
        done = 1;
-       git_config(git_gpg_config, NULL);
+       repo_config(the_repository, git_gpg_config, NULL);
 }
 
 static char *configured_signing_key;
diff --git a/help.c b/help.c
index 652efebf00c309f054ab9389e6c3e65d278e7c10..db62cda44426e6a583be208dede8bcd0f5261f59 100644 (file)
--- a/help.c
+++ b/help.c
@@ -332,7 +332,7 @@ static int get_colopts(const char *var, const char *value,
 void list_commands(struct cmdnames *main_cmds, struct cmdnames *other_cmds)
 {
        unsigned int colopts = 0;
-       git_config(get_colopts, &colopts);
+       repo_config(the_repository, get_colopts, &colopts);
 
        if (main_cmds->cnt) {
                const char *exec_path = git_exec_path();
@@ -502,7 +502,7 @@ static void list_all_cmds_help_aliases(int longest)
        struct cmdname_help *aliases;
        int i;
 
-       git_config(get_alias, &alias_list);
+       repo_config(the_repository, get_alias, &alias_list);
        string_list_sort(&alias_list);
 
        for (i = 0; i < alias_list.nr; i++) {
index 02ab80533f0e34547d831b0af71ddcb91dd32903..17b9fe4ff8c7a27365a8ce38af0e158b3d1f4717 100644 (file)
@@ -150,7 +150,7 @@ int cmd_main(int argc, const char **argv)
 
        trace2_cmd_name("http-fetch");
 
-       git_config(git_default_config, NULL);
+       repo_config(the_repository, git_default_config, NULL);
 
        if (packfile) {
                if (!index_pack_args.nr)
diff --git a/http.c b/http.c
index 9b62f627dc576efb7ee38f5089684aec758d5d54..d94e8f63b573805f29f0b25199e9bc62e0bb5034 100644 (file)
--- a/http.c
+++ b/http.c
@@ -1315,7 +1315,7 @@ void http_init(struct remote *remote, const char *url, int proactive_auth)
        http_is_verbose = 0;
        normalized_url = url_normalize(url, &config.url);
 
-       git_config(urlmatch_config_entry, &config);
+       repo_config(the_repository, urlmatch_config_entry, &config);
        free(normalized_url);
        string_list_clear(&config.vars, 1);
 
index f5a656ac71dc2db06e087f4bfce486418724284e..9b26c669c01558c69e84ff61e6c0829564f23eaf 100644 (file)
@@ -1776,7 +1776,7 @@ int cmd_main(int argc, const char **argv)
        int ret;
 
        setup_git_directory_gently(&nongit_ok);
-       git_config(git_imap_config, &server);
+       repo_config(the_repository, git_imap_config, &server);
 
        argc = parse_options(argc, (const char **)argv, "", imap_send_options, imap_send_usage, 0);
 
index e28c841375861d3b735755de1dea780283bb7d28..c47acde07f335bb146e06ea617fb15178ab5dc89 100644 (file)
--- a/ls-refs.c
+++ b/ls-refs.c
@@ -159,7 +159,7 @@ int ls_refs(struct repository *r, struct packet_reader *request)
        strbuf_init(&data.buf, 0);
        strvec_init(&data.hidden_refs);
 
-       git_config(ls_refs_config, &data);
+       repo_config(the_repository, ls_refs_config, &data);
 
        while (packet_reader_read(request) == PACKET_READ_NORMAL) {
                const char *arg = request->line;
index b2dc26da4fe92d2c922435fa5dad381f996ef26b..fafe2c919718560c22118aa736252f22759857fb 100644 (file)
@@ -357,7 +357,7 @@ static void initialize_ll_merge(void)
        if (ll_user_merge_tail)
                return;
        ll_user_merge_tail = &ll_user_merge;
-       git_config(read_merge_config, NULL);
+       repo_config(the_repository, read_merge_config, NULL);
 }
 
 static const struct ll_merge_driver *find_ll_merge_driver(const char *merge_attr)
index 473ff61e36e9f7bad64d24c91880a4829f1ee391..49aa37a8f236bd23d83bb81a894ab9e4436e1756 100644 (file)
@@ -5387,7 +5387,7 @@ static void merge_recursive_config(struct merge_options *opt, int ui)
                        free(value);
                }
        }
-       git_config(git_xmerge_config, NULL);
+       repo_config(the_repository, git_xmerge_config, NULL);
 }
 
 static void init_merge_options(struct merge_options *opt,
index ac66b82dd3108280bcba8ff426de724a050c16f4..6a50c6d56466d5ec43cc5dd169e024b77aff9e78 100644 (file)
@@ -162,7 +162,7 @@ struct notes_rewrite_cfg *init_copy_notes_for_rewrite(const char *cmd)
                c->refs_from_env = 1;
                string_list_add_refs_from_colon_sep(c->refs, rewrite_refs_env);
        }
-       git_config(notes_rewrite_config, c);
+       repo_config(the_repository, notes_rewrite_config, c);
        if (!c->enabled || !c->refs->nr) {
                string_list_clear(c->refs, 0);
                free(c->refs);
diff --git a/notes.c b/notes.c
index 97b995f3f2da6f154337b4672af6f67438ae0f2a..49393fbfd8d860dc6c4e0d29a28b6eb13c99d639 100644 (file)
--- a/notes.c
+++ b/notes.c
@@ -1123,7 +1123,7 @@ void load_display_notes(struct display_notes_opt *opt)
                        load_config_refs = 1;
        }
 
-       git_config(notes_display_config, &load_config_refs);
+       repo_config(the_repository, notes_display_config, &load_config_refs);
 
        if (opt) {
                struct string_list_item *item;
index 0bc8ad8a9a8bc1b0002e3634dbf9588569dc61bd..cee96b9d94dd0a7ca4c8c416a8307087413e258c 100644 (file)
--- a/pretty.c
+++ b/pretty.c
@@ -141,7 +141,7 @@ static void setup_commit_formats(void)
        COPY_ARRAY(commit_formats, builtin_formats,
                   ARRAY_SIZE(builtin_formats));
 
-       git_config(git_pretty_formats_config, NULL);
+       repo_config(the_repository, git_pretty_formats_config, NULL);
 }
 
 static struct cmt_fmt_map *find_commit_format_recursive(const char *sought,
index 4c3817f4ec1a887aa6e6feed2a1336ed2b29cbe2..5134781d52d7f7376ef2b7d687fd599152fbb674 100644 (file)
@@ -386,7 +386,7 @@ static struct ref_store *reftable_be_init(struct repository *repo,
        refs->write_options.lock_timeout_ms = 100;
        refs->write_options.fsync = reftable_be_fsync;
 
-       git_config(reftable_be_config, &refs->write_options);
+       repo_config(the_repository, reftable_be_config, &refs->write_options);
 
        /*
         * It is somewhat unfortunate that we have to mirror the default block
index 8bb97c98229bdd5694f0a43523f1b5786dd5f676..1ac2075144c97c6fcb2cab8837a98f5f97667e9b 100644 (file)
--- a/rerere.c
+++ b/rerere.c
@@ -879,7 +879,7 @@ static void git_rerere_config(void)
 {
        git_config_get_bool("rerere.enabled", &rerere_enabled);
        git_config_get_bool("rerere.autoupdate", &rerere_autoupdate);
-       git_config(git_default_config, NULL);
+       repo_config(the_repository, git_default_config, NULL);
 }
 
 static GIT_PATH_FUNC(git_path_rr_cache, "rr-cache")
@@ -1247,7 +1247,7 @@ void rerere_gc(struct repository *r, struct string_list *rr)
                                       &cutoff_resolve, now);
        repo_config_get_expiry_in_days(the_repository, "gc.rerereunresolved",
                                       &cutoff_noresolve, now);
-       git_config(git_default_config, NULL);
+       repo_config(the_repository, git_default_config, NULL);
        dir = opendir(repo_git_path_replace(the_repository, &buf, "rr-cache"));
        if (!dir)
                die_errno(_("unable to open rr-cache directory"));
index 0ca6a297a6b09c31ca3f279aaa6475b66acdce86..ad63c100eb936ea32a2692a424fec8e9e6fda3b2 100644 (file)
@@ -1636,7 +1636,7 @@ void exclude_hidden_refs(struct ref_exclusions *exclusions, const char *section)
        cb.exclusions = exclusions;
        cb.section = section;
 
-       git_config(hide_refs_config, &cb);
+       repo_config(the_repository, hide_refs_config, &cb);
 }
 
 struct all_refs_cb {
index 0dc79fa9fb07a5093691ba3ffb2c65776dba8db9..3b713abca3c289610cc6f429e62070cc6e5db36f 100644 (file)
--- a/scalar.c
+++ b/scalar.c
@@ -713,7 +713,7 @@ static int cmd_reconfigure(int argc, const char **argv)
                            maintenance_str);
        }
 
-       git_config(get_scalar_repos, &scalar_repos);
+       repo_config(the_repository, get_scalar_repos, &scalar_repos);
 
        for (size_t i = 0; i < scalar_repos.nr; i++) {
                int succeeded = 0;
index 67e4310edcff5af9fc3737ab47ac9bb50f18b326..df207f33e07bb72aca60b08c6e6b20b0b526a0f5 100644 (file)
@@ -327,7 +327,7 @@ static int git_sequencer_config(const char *k, const char *v,
 void sequencer_init_config(struct replay_opts *opts)
 {
        opts->default_msg_cleanup = COMMIT_MSG_CLEANUP_NONE;
-       git_config(git_sequencer_config, opts);
+       repo_config(the_repository, git_sequencer_config, opts);
 }
 
 static inline int is_rebase_i(const struct replay_opts *opts)
diff --git a/setup.c b/setup.c
index 6f52dab64cacb66d5856ced25111330cd75e52c7..91a3affdd8f551ea2ba42e35c156a07dc33c5061 100644 (file)
--- a/setup.c
+++ b/setup.c
@@ -2339,7 +2339,7 @@ static int create_default_files(const char *template_path,
        copy_templates(template_path);
        git_config_clear();
        repo_settings_reset_shared_repository(the_repository);
-       git_config(git_default_config, NULL);
+       repo_config(the_repository, git_default_config, NULL);
 
        reinit = is_reinit();
 
@@ -2610,7 +2610,7 @@ int init_db(const char *git_dir, const char *real_git_dir,
         * have set up the repository format such that we can evaluate
         * includeIf conditions correctly in the case of re-initialization.
         */
-       git_config(platform_core_config, NULL);
+       repo_config(the_repository, platform_core_config, NULL);
 
        safe_create_dir(the_repository, git_dir, 0);
 
index 6967c8e25c686012d46963a139cf004f69e0728e..77c15a46cfa07d25c3028c9e2d77a3e0b47c9e92 100644 (file)
@@ -11,7 +11,7 @@ int cmd__advise_if_enabled(int argc, const char **argv)
                die("usage: %s <advice>", argv[0]);
 
        setup_git_directory();
-       git_config(git_default_config, NULL);
+       repo_config(the_repository, git_default_config, NULL);
 
        /*
         * Any advice type can be used for testing, but NESTED_TAG was
index 75e028ab2a04497d3438bf46e936e0c4eb44ae8d..41ba864790014e163fb03027497bd9c91c3c8bef 100644 (file)
  *                             ascending order of priority from a config_set
  *                             constructed from files entered as arguments.
  *
- * iterate -> iterate over all values using git_config(), and print some
+ * iterate -> iterate over all values using repo_config(), and print some
  *            data for each
  *
- * git_config_int -> iterate over all values using git_config() and print the
+ * git_config_int -> iterate over all values using repo_config() and print the
  *                   integer value for the entered key or die
  *
  * Examples:
@@ -218,10 +218,10 @@ int cmd__config(int argc, const char **argv)
                        goto exit1;
                }
        } else if (!strcmp(argv[1], "iterate")) {
-               git_config(iterate_cb, NULL);
+               repo_config(the_repository, iterate_cb, NULL);
                goto exit0;
        } else if (argc == 3 && !strcmp(argv[1], "git_config_int")) {
-               git_config(parse_int_cb, (void *) argv[2]);
+               repo_config(the_repository, parse_int_cb, (void *) argv[2]);
                goto exit0;
        }
 
index e277dde8e7107a61b719972c9f9065eee0abb1a3..b2da48eda05185dd345f388c4713d2db4f7237fd 100644 (file)
@@ -19,7 +19,7 @@ int cmd__read_cache(int argc, const char **argv)
        if (argc == 2)
                cnt = strtol(argv[1], NULL, 0);
        setup_git_directory();
-       git_config(git_default_config, NULL);
+       repo_config(the_repository, git_default_config, NULL);
 
        for (i = 0; i < cnt; i++) {
                repo_read_index(the_repository);
index 94c48ababbefd097d1c7934a1b587d4f4a54db8f..aa3a9894d257ef21fa5e2e73b2fe1b1db5193e8f 100644 (file)
@@ -41,7 +41,7 @@ int cmd__userdiff(int argc, const char **argv)
 
        if (want & USERDIFF_DRIVER_TYPE_CUSTOM) {
                setup_git_directory();
-               git_config(cmd__userdiff_config, NULL);
+               repo_config(the_repository, cmd__userdiff_config, NULL);
        }
 
        for_each_userdiff_driver(driver_cb, &want);
index b395adbdf2a405567bc40c254125265f30b12bbd..39caeba865391cd6ed11f5952d6ccfe19bd6f838 100644 (file)
@@ -1214,7 +1214,7 @@ void setup_mailinfo(struct mailinfo *mi)
        mi->header_stage = 1;
        mi->use_inbody_headers = 1;
        mi->content_top = mi->content;
-       git_config(git_mailinfo_config, mi);
+       repo_config(the_repository, git_mailinfo_config, mi);
 }
 
 void clear_mailinfo(struct mailinfo *mi)
index 3281a37d51830a60e864c78dff16dbf4eba9d800..b76eb866aae801340a20a873802bff26e124ddd2 100644 (file)
@@ -1154,7 +1154,7 @@ void setup_mailinfo(struct mailinfo *mi)
        mi->header_stage = 1;
        mi->use_inbody_headers = 1;
        mi->content_top = mi->content;
-       git_config(git_mailinfo_config, mi);
+       repo_config(the_repository, git_mailinfo_config, mi);
 }
 
 void clear_mailinfo(struct mailinfo *mi)
index 310cf582dc370374953b0c7ecef90d6e616c9942..911a81ed993ec6aa802bcd0ecbb5a86e3e497d43 100644 (file)
--- a/trailer.c
+++ b/trailer.c
@@ -595,8 +595,8 @@ void trailer_config_init(void)
        default_conf_info.where = WHERE_END;
        default_conf_info.if_exists = EXISTS_ADD_IF_DIFFERENT_NEIGHBOR;
        default_conf_info.if_missing = MISSING_ADD;
-       git_config(git_trailer_default_config, NULL);
-       git_config(git_trailer_config, NULL);
+       repo_config(the_repository, git_trailer_default_config, NULL);
+       repo_config(the_repository, git_trailer_config, NULL);
        configured = 1;
 }
 
index c123ac1e38b815f0d34d66ac05eec73f0a66adc1..a246afd09fa5d5f48c32450bc10495fde7025b01 100644 (file)
@@ -202,7 +202,7 @@ static int fetch_refs_from_bundle(struct transport *transport,
        if (!data->get_refs_from_bundle_called)
                get_refs_from_bundle_inner(transport);
 
-       git_config(fetch_fsck_config_cb, &msg_types);
+       repo_config(the_repository, fetch_fsck_config_cb, &msg_types);
        opts.fsck_msg_types = msg_types.buf;
 
        ret = unbundle(the_repository, &data->header, data->fd,