git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] submodule: remove redundant check for the_index.initialized
@ 2013-06-09 16:33 René Scharfe
  2013-06-09 16:44 ` Felipe Contreras
  0 siblings, 1 reply; 3+ messages in thread
From: René Scharfe @ 2013-06-09 16:33 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Jens Lehmann

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>
---
 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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-06-09 17:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-09 16:33 [PATCH] submodule: remove redundant check for the_index.initialized René Scharfe
2013-06-09 16:44 ` Felipe Contreras
2013-06-09 17:41   ` René Scharfe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).