Skip to content

Commit 557a599

Browse files
bmwillgitster
authored andcommitted
submodule: remove gitmodules_config
Now that the submodule-config subsystem can lazily read the gitmodules file we no longer need to explicitly pre-read the gitmodules by calling 'gitmodules_config()' so let's remove it. Signed-off-by: Brandon Williams <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 3302871 commit 557a599

16 files changed

+0
-53
lines changed

builtin/checkout.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1179,7 +1179,6 @@ int cmd_checkout(int argc, const char **argv, const char *prefix)
11791179
opts.prefix = prefix;
11801180
opts.show_progress = -1;
11811181

1182-
gitmodules_config();
11831182
git_config(git_checkout_config, &opts);
11841183

11851184
opts.track = BRANCH_TRACK_UNSPECIFIED;

builtin/commit.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,6 @@ static void determine_whence(struct wt_status *s)
195195
static void status_init_config(struct wt_status *s, config_fn_t fn)
196196
{
197197
wt_status_prepare(s);
198-
gitmodules_config();
199198
git_config(fn, s);
200199
determine_whence(s);
201200
init_diff_ui_defaults();

builtin/diff-files.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ int cmd_diff_files(int argc, const char **argv, const char *prefix)
2626

2727
git_config(git_diff_basic_config, NULL); /* no "diff" UI options */
2828
init_revisions(&rev, prefix);
29-
gitmodules_config();
3029
rev.abbrev = 0;
3130
precompose_argv(argc, argv);
3231

builtin/diff-index.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ int cmd_diff_index(int argc, const char **argv, const char *prefix)
2323

2424
git_config(git_diff_basic_config, NULL); /* no "diff" UI options */
2525
init_revisions(&rev, prefix);
26-
gitmodules_config();
2726
rev.abbrev = 0;
2827
precompose_argv(argc, argv);
2928

builtin/diff-tree.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ int cmd_diff_tree(int argc, const char **argv, const char *prefix)
110110

111111
git_config(git_diff_basic_config, NULL); /* no "diff" UI options */
112112
init_revisions(opt, prefix);
113-
gitmodules_config();
114113
opt->abbrev = 0;
115114
opt->diff = 1;
116115
opt->disable_stdin = 1;

builtin/diff.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,8 +315,6 @@ int cmd_diff(int argc, const char **argv, const char *prefix)
315315
no_index = DIFF_NO_INDEX_IMPLICIT;
316316
}
317317

318-
if (!no_index)
319-
gitmodules_config();
320318
init_diff_ui_defaults();
321319
git_config(git_diff_ui_config, NULL);
322320
precompose_argv(argc, argv);

builtin/fetch.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1360,10 +1360,6 @@ int cmd_fetch(int argc, const char **argv, const char *prefix)
13601360
if (depth || deepen_since || deepen_not.nr)
13611361
deepen = 1;
13621362

1363-
if (recurse_submodules != RECURSE_SUBMODULES_OFF) {
1364-
gitmodules_config();
1365-
}
1366-
13671363
if (all) {
13681364
if (argc == 1)
13691365
die(_("fetch --all does not take a repository argument"));

builtin/grep.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1048,10 +1048,6 @@ int cmd_grep(int argc, const char **argv, const char *prefix)
10481048
}
10491049
#endif
10501050

1051-
if (recurse_submodules) {
1052-
gitmodules_config();
1053-
}
1054-
10551051
if (show_in_pager && (cached || list.nr))
10561052
die(_("--open-files-in-pager only works on the worktree"));
10571053

builtin/mv.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,6 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
131131
struct stat st;
132132
struct string_list src_for_dst = STRING_LIST_INIT_NODUP;
133133

134-
gitmodules_config();
135134
git_config(git_default_config, NULL);
136135

137136
argc = parse_options(argc, argv, prefix, builtin_mv_options,

builtin/read-tree.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,6 @@ int cmd_read_tree(int argc, const char **argv, const char *unused_prefix)
164164
argc = parse_options(argc, argv, unused_prefix, read_tree_options,
165165
read_tree_usage, 0);
166166

167-
load_submodule_cache();
168-
169167
hold_locked_index(&lock_file, LOCK_DIE_ON_ERROR);
170168

171169
prefix_set = opts.prefix ? 1 : 0;

0 commit comments

Comments
 (0)