summaryrefslogtreecommitdiff
path: root/submodule.c
diff options
context:
space:
mode:
authorRené Scharfe <rene.scharfe@lsrfire.ath.cx>2013-06-09 16:33:45 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-06-09 20:46:45 (GMT)
commit467b8fe1bb900832f51281fe954d9134b545d6dd (patch)
tree4919447580b0139cca3721d14367cc445a035557 /submodule.c
parent26f8f32a2039a0e4568fb7d3682be19b94a9dd7f (diff)
downloadgit-467b8fe1bb900832f51281fe954d9134b545d6dd.zip
git-467b8fe1bb900832f51281fe954d9134b545d6dd.tar.gz
git-467b8fe1bb900832f51281fe954d9134b545d6dd.tar.bz2
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>
Diffstat (limited to 'submodule.c')
-rw-r--r--submodule.c5
1 files 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++)