Skip to content

Commit

Permalink
submodule: remove redundant check for the_index.initialized
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
René Scharfe authored and Junio C Hamano committed Jun 9, 2013
1 parent 26f8f32 commit 467b8fe
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions submodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -603,9 +603,8 @@ int fetch_populated_submodules(const struct argv_array *options,
if (!work_tree)
goto out;

if (!the_index.initialized)
if (read_cache() < 0)
die("index file corrupt");
if (read_cache() < 0)
die("index file corrupt");

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

0 comments on commit 467b8fe

Please sign in to comment.