git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] submodule: remove unnecessary check

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
May 31, 2013, 08:27 UTC
Message-ID
<1369988856-4304-1-git-send-email-felipe.contreras@gmail.com>
read_cache() already does that check.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 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.358.g5a91d05
Message 1 of 1 in “submodule: remove unnecessary check”
  1. submodule: remove unnecessary checkFelipe Contreras, May 31, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.