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

* Re: [PATCH] submodule: remove redundant check for the_index.initialized
  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
  0 siblings, 1 reply; 3+ messages in thread
From: Felipe Contreras @ 2013-06-09 16:44 UTC (permalink / raw)
  To: René Scharfe; +Cc: git, Junio C Hamano, Jens Lehmann

On Sun, Jun 9, 2013 at 11:33 AM, René Scharfe
<rene.scharfe@lsrfire.ath.cx> wrote:
> read_cache already performs the same check and returns immediately if
> the cache has already been loaded.

This time I beat you to it first ;)
http://article.gmane.org/gmane.comp.version-control.git/226701

-- 
Felipe Contreras

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

* Re: [PATCH] submodule: remove redundant check for the_index.initialized
  2013-06-09 16:44 ` Felipe Contreras
@ 2013-06-09 17:41   ` René Scharfe
  0 siblings, 0 replies; 3+ messages in thread
From: René Scharfe @ 2013-06-09 17:41 UTC (permalink / raw)
  To: Felipe Contreras; +Cc: git, Junio C Hamano, Jens Lehmann

Am 09.06.2013 18:44, schrieb Felipe Contreras:
> On Sun, Jun 9, 2013 at 11:33 AM, René Scharfe
> <rene.scharfe@lsrfire.ath.cx> wrote:
>> read_cache already performs the same check and returns immediately if
>> the cache has already been loaded.
>
> This time I beat you to it first ;)
> http://article.gmane.org/gmane.comp.version-control.git/226701

Good to see we're agreeing on something for once. ;)

René

^ permalink raw reply	[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).