diff --git a/builtin/archive.c b/builtin/archive.c index 45d11669aa..708243cd7d 100644 --- a/builtin/archive.c +++ b/builtin/archive.c @@ -9,6 +9,7 @@ #include "parse-options.h" #include "pkt-line.h" #include "sideband.h" +#include "config.h" static void create_output_file(const char *output_file) { @@ -95,6 +96,7 @@ int cmd_archive(int argc, const char **argv, const char *prefix) OPT_END() }; + git_config(git_default_config, NULL); argc = parse_options(argc, argv, prefix, local_opts, NULL, PARSE_OPT_KEEP_ALL); diff --git a/builtin/bisect--helper.c b/builtin/bisect--helper.c index 9d9540a0ab..c20df85cfd 100644 --- a/builtin/bisect--helper.c +++ b/builtin/bisect--helper.c @@ -9,6 +9,7 @@ #include "prompt.h" #include "quote.h" #include "revision.h" +#include "config.h" static GIT_PATH_FUNC(git_path_bisect_terms, "BISECT_TERMS") static GIT_PATH_FUNC(git_path_bisect_expected_rev, "BISECT_EXPECTED_REV") @@ -1074,6 +1075,7 @@ int cmd_bisect__helper(int argc, const char **argv, const char *prefix) }; struct bisect_terms terms = { .term_good = NULL, .term_bad = NULL }; + git_config(git_default_config, NULL); argc = parse_options(argc, argv, prefix, options, git_bisect_helper_usage, PARSE_OPT_KEEP_DASHDASH | PARSE_OPT_KEEP_UNKNOWN); diff --git a/builtin/bundle.c b/builtin/bundle.c index ea6948110b..a9c2b849c1 100644 --- a/builtin/bundle.c +++ b/builtin/bundle.c @@ -3,6 +3,7 @@ #include "parse-options.h" #include "cache.h" #include "bundle.h" +#include "config.h" /* * Basic handler for bundle files to connect repositories via sneakernet. @@ -109,6 +110,7 @@ static int cmd_bundle_verify(int argc, const char **argv, const char *prefix) { }; const char* bundle_file; + git_config(git_default_config, NULL); argc = parse_options_cmd_bundle(argc, argv, prefix, builtin_bundle_verify_usage, options, &bundle_file); /* bundle internals use argv[1] as further parameters */ diff --git a/builtin/check-ref-format.c b/builtin/check-ref-format.c index bc67d3f0a8..abee1be472 100644 --- a/builtin/check-ref-format.c +++ b/builtin/check-ref-format.c @@ -6,6 +6,7 @@ #include "refs.h" #include "builtin.h" #include "strbuf.h" +#include "config.h" static const char builtin_check_ref_format_usage[] = "git check-ref-format [--normalize] [] \n" @@ -58,6 +59,7 @@ int cmd_check_ref_format(int argc, const char **argv, const char *prefix) int flags = 0; const char *refname; + git_config(git_default_config, NULL); if (argc == 2 && !strcmp(argv[1], "-h")) usage(builtin_check_ref_format_usage); diff --git a/builtin/clone.c b/builtin/clone.c index eeb74c0217..73d815fd6d 100644 --- a/builtin/clone.c +++ b/builtin/clone.c @@ -990,6 +990,8 @@ int cmd_clone(int argc, const char **argv, const char *prefix) struct transport_ls_refs_options transport_ls_refs_options = TRANSPORT_LS_REFS_OPTIONS_INIT; + git_config(platform_core_config, NULL); + packet_trace_identity("clone"); git_config(git_clone_config, NULL); diff --git a/builtin/column.c b/builtin/column.c index 40d4b3bee2..9898d9adba 100644 --- a/builtin/column.c +++ b/builtin/column.c @@ -34,6 +34,8 @@ int cmd_column(int argc, const char **argv, const char *prefix) OPT_END() }; + git_config(platform_core_config, NULL); + /* This one is special and must be the first one */ if (argc > 1 && starts_with(argv[1], "--command=")) { command = argv[1] + 10; diff --git a/builtin/credential-store.c b/builtin/credential-store.c index ae3c1ba75f..8f22ae12a4 100644 --- a/builtin/credential-store.c +++ b/builtin/credential-store.c @@ -4,6 +4,7 @@ #include "credential.h" #include "string-list.h" #include "parse-options.h" +#include "config.h" static struct lock_file credential_lock; @@ -165,6 +166,8 @@ int cmd_credential_store(int argc, const char **argv, const char *prefix) umask(077); + git_config(git_default_config, NULL); + argc = parse_options(argc, (const char **)argv, prefix, options, usage, 0); if (argc != 1) usage_with_options(usage, options); diff --git a/builtin/fetch-pack.c b/builtin/fetch-pack.c index c2d96f4c89..dbd0a6c1be 100644 --- a/builtin/fetch-pack.c +++ b/builtin/fetch-pack.c @@ -5,6 +5,7 @@ #include "connect.h" #include "oid-array.h" #include "protocol.h" +#include "config.h" static const char fetch_pack_usage[] = "git fetch-pack [--all] [--stdin] [--quiet | -q] [--keep | -k] [--thin] " @@ -57,6 +58,7 @@ int cmd_fetch_pack(int argc, const char **argv, const char *prefix) struct packet_reader reader; enum protocol_version version; + git_config(git_default_config, NULL); fetch_if_missing = 0; packet_trace_identity("fetch-pack"); diff --git a/builtin/get-tar-commit-id.c b/builtin/get-tar-commit-id.c index 491af9202d..a623518ae7 100644 --- a/builtin/get-tar-commit-id.c +++ b/builtin/get-tar-commit-id.c @@ -6,6 +6,7 @@ #include "tar.h" #include "builtin.h" #include "quote.h" +#include "config.h" static const char builtin_get_tar_commit_id_usage[] = "git get-tar-commit-id"; @@ -27,6 +28,7 @@ int cmd_get_tar_commit_id(int argc, const char **argv, const char *prefix) if (argc != 1) usage(builtin_get_tar_commit_id_usage); + git_config(git_default_config, NULL); n = read_in_full(0, buffer, HEADERSIZE); if (n < 0) die_errno("git get-tar-commit-id: read error"); diff --git a/builtin/log.c b/builtin/log.c index 6102893fcc..c840041ec5 100644 --- a/builtin/log.c +++ b/builtin/log.c @@ -2296,6 +2296,7 @@ int cmd_cherry(int argc, const char **argv, const char *prefix) OPT_END() }; + git_config(git_default_config, NULL); argc = parse_options(argc, argv, prefix, options, cherry_usage, 0); switch (argc) { diff --git a/builtin/ls-remote.c b/builtin/ls-remote.c index 1794548c71..3cc501f998 100644 --- a/builtin/ls-remote.c +++ b/builtin/ls-remote.c @@ -4,6 +4,7 @@ #include "ref-filter.h" #include "remote.h" #include "refs.h" +#include "config.h" static const char * const ls_remote_usage[] = { N_("git ls-remote [--heads] [--tags] [--refs] [--upload-pack=]\n" @@ -86,6 +87,7 @@ int cmd_ls_remote(int argc, const char **argv, const char *prefix) UNLEAK(sorting); + git_config(git_default_config, NULL); if (argc > 1) { int i; CALLOC_ARRAY(pattern, argc); diff --git a/builtin/mailinfo.c b/builtin/mailinfo.c index 01d16ef9e5..df6cc41721 100644 --- a/builtin/mailinfo.c +++ b/builtin/mailinfo.c @@ -8,6 +8,7 @@ #include "strbuf.h" #include "mailinfo.h" #include "parse-options.h" +#include "config.h" static const char * const mailinfo_usage[] = { /* TRANSLATORS: keep <> in "<" mail ">" info. */ @@ -78,6 +79,7 @@ int cmd_mailinfo(int argc, const char **argv, const char *prefix) OPT_END() }; + git_config(git_default_config, NULL); setup_mailinfo(&mi); meta_charset.policy = CHARSET_DEFAULT; diff --git a/builtin/mailsplit.c b/builtin/mailsplit.c index 664400b816..472d2eb8a4 100644 --- a/builtin/mailsplit.c +++ b/builtin/mailsplit.c @@ -8,6 +8,7 @@ #include "builtin.h" #include "string-list.h" #include "strbuf.h" +#include "config.h" static const char git_mailsplit_usage[] = "git mailsplit [-d] [-f] [-b] [--keep-cr] -o [(|)...]"; @@ -276,6 +277,7 @@ int cmd_mailsplit(int argc, const char **argv, const char *prefix) const char **argp; static const char *stdin_only[] = { "-", NULL }; + git_config(git_default_config, NULL); for (argp = argv+1; *argp; argp++) { const char *arg = *argp; diff --git a/builtin/merge-index.c b/builtin/merge-index.c index c0383fe9df..24e5c1f6ea 100644 --- a/builtin/merge-index.c +++ b/builtin/merge-index.c @@ -1,6 +1,7 @@ #define USE_THE_INDEX_COMPATIBILITY_MACROS #include "builtin.h" #include "run-command.h" +#include "config.h" static const char *pgm; static int one_shot, quiet; @@ -77,6 +78,8 @@ int cmd_merge_index(int argc, const char **argv, const char *prefix) */ signal(SIGCHLD, SIG_DFL); + git_config(git_default_config, NULL); + if (argc < 3) usage("git merge-index [-o] [-q] (-a | [--] [...])"); diff --git a/builtin/merge-tree.c b/builtin/merge-tree.c index de8520778d..a3d4f02472 100644 --- a/builtin/merge-tree.c +++ b/builtin/merge-tree.c @@ -7,6 +7,7 @@ #include "blob.h" #include "exec-cmd.h" #include "merge-blobs.h" +#include "config.h" static const char merge_tree_usage[] = "git merge-tree "; @@ -378,6 +379,7 @@ int cmd_merge_tree(int argc, const char **argv, const char *prefix) if (argc != 4) usage(merge_tree_usage); + git_config(git_default_config, NULL); buf1 = get_tree_descriptor(r, t+0, argv[1]); buf2 = get_tree_descriptor(r, t+1, argv[2]); buf3 = get_tree_descriptor(r, t+2, argv[3]); diff --git a/builtin/mktag.c b/builtin/mktag.c index dddcccdd36..9dc048a9a2 100644 --- a/builtin/mktag.c +++ b/builtin/mktag.c @@ -84,6 +84,7 @@ int cmd_mktag(int argc, const char **argv, const char *prefix) builtin_mktag_options, builtin_mktag_usage, 0); + git_config(git_default_config, NULL); if (strbuf_read(&buf, 0, 0) < 0) die_errno(_("could not read from stdin")); diff --git a/builtin/mktree.c b/builtin/mktree.c index 891991b00d..ed6fae0460 100644 --- a/builtin/mktree.c +++ b/builtin/mktree.c @@ -8,6 +8,7 @@ #include "tree.h" #include "parse-options.h" #include "object-store.h" +#include "config.h" static struct treeent { unsigned mode; @@ -157,6 +158,7 @@ int cmd_mktree(int ac, const char **av, const char *prefix) OPT_END() }; + git_config(git_default_config, NULL); ac = parse_options(ac, av, prefix, option, mktree_usage, 0); getline_fn = nul_term_line ? strbuf_getline_nul : strbuf_getline_lf; diff --git a/builtin/pack-refs.c b/builtin/pack-refs.c index cfbd5c36c7..28f79b9938 100644 --- a/builtin/pack-refs.c +++ b/builtin/pack-refs.c @@ -3,6 +3,7 @@ #include "parse-options.h" #include "refs.h" #include "repository.h" +#include "config.h" static char const * const pack_refs_usage[] = { N_("git pack-refs []"), diff --git a/builtin/prune-packed.c b/builtin/prune-packed.c index b7b9281a8c..83c4fd17a6 100644 --- a/builtin/prune-packed.c +++ b/builtin/prune-packed.c @@ -1,6 +1,7 @@ #include "builtin.h" #include "parse-options.h" #include "prune-packed.h" +#include "config.h" static const char * const prune_packed_usage[] = { N_("git prune-packed [-n | --dry-run] [-q | --quiet]"), @@ -18,6 +19,7 @@ int cmd_prune_packed(int argc, const char **argv, const char *prefix) OPT_END() }; + git_config(git_default_config, NULL); argc = parse_options(argc, argv, prefix, prune_packed_options, prune_packed_usage, 0); diff --git a/builtin/prune.c b/builtin/prune.c index 02c6ab7cba..847864dbe5 100644 --- a/builtin/prune.c +++ b/builtin/prune.c @@ -9,6 +9,7 @@ #include "prune-packed.h" #include "object-store.h" #include "shallow.h" +#include "config.h" static const char * const prune_usage[] = { N_("git prune [-n] [-v] [--progress] [--expire