bash prompt: return early from __git_ps1() when not in a git repository
[gitweb.git] / submodule.c
index ad476ce5fb894bf62844ee6ca7413ce343f2933a..86854248983be78b3702f5045a659dfe83bf4446 100644 (file)
@@ -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++)