[PATCH] submodule: remove redundant check for the_index.initialized

2013-06-09 Thread René Scharfe
read_cache already performs the same check and returns immediately if
the cache has already been loaded.

Signed-off-by: René Scharfe rene.scha...@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

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] submodule: remove redundant check for the_index.initialized

2013-06-09 Thread Felipe Contreras
On Sun, Jun 9, 2013 at 11:33 AM, René Scharfe
rene.scha...@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
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] submodule: remove redundant check for the_index.initialized

2013-06-09 Thread René Scharfe

Am 09.06.2013 18:44, schrieb Felipe Contreras:

On Sun, Jun 9, 2013 at 11:33 AM, René Scharfe
rene.scha...@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é

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html