Skip to content

Commit 467b8fe

Browse files
René Scharfegitster
authored andcommitted
submodule: remove redundant check for the_index.initialized
read_cache already performs the same check and returns immediately if the cache has already been loaded. Signed-off-by: René Scharfe <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 26f8f32 commit 467b8fe

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

submodule.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -603,9 +603,8 @@ int fetch_populated_submodules(const struct argv_array *options,
603603
if (!work_tree)
604604
goto out;
605605

606-
if (!the_index.initialized)
607-
if (read_cache() < 0)
608-
die("index file corrupt");
606+
if (read_cache() < 0)
607+
die("index file corrupt");
609608

610609
argv_array_push(&argv, "fetch");
611610
for (i = 0; i < options->argc; i++)

0 commit comments

Comments
 (0)