From: René Scharfe Date: Sun, 9 Jun 2013 16:33:45 +0000 (+0200) Subject: submodule: remove redundant check for the_index.initialized X-Git-Tag: v1.8.3.1~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=467b8fe1bb900832f51281fe954d9134b545d6dd;p=git 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 Signed-off-by: Junio C Hamano --- diff --git a/submodule.c b/submodule.c index e728025f60..1821a5b316 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++)