From: René Scharfe Date: Sun, 09 Jun 2013 16:33:45 GMT Subject: [PATCH] submodule: remove redundant check for the_index.initialized Message-ID: <1370795625-10506-1-git-send-email-rene.scharfe@lsrfire.ath.cx> read_cache already performs the same check and returns immediately if the cache has already been loaded. Signed-off-by: René Scharfe --- submodule.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/submodule.c b/submodule.c index e728025..1821a5b 100644 --- a/submodule.c +++ b/submodule.c @@ -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++) -- 1.8.3