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 <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
René Scharfe committed
Jun 9, 2013 at 18:33 UTC
467b8fe1bb900832f51281fe954d9134b545d6dd
1 file changed
+2
-3
submodule.c
+2
-3
@@ -603,9 +603,8 @@ int fetch_populated_submodules(const struct argv_array *options,
603
if (!work_tree)
604
goto out;
605
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");
608
609
argv_array_push(&argv, "fetch");
610
for (i = 0; i < options->argc; i++)