submodule: convert is_submodule_initialized to work on a repository
[gitweb.git] / builtin / grep.c
index f61a9d938b44424414812c57eecc309bd563f4b3..e3ba1d98e3b399941c7c25093f8d5b63327d7d2a 100644 (file)
@@ -4,6 +4,7 @@
  * Copyright (c) 2006 Junio C Hamano
  */
 #include "cache.h"
+#include "repository.h"
 #include "config.h"
 #include "blob.h"
 #include "tree.h"
@@ -643,7 +644,7 @@ static int grep_submodule_launch(struct grep_opt *opt,
 static int grep_submodule(struct grep_opt *opt, const struct object_id *oid,
                          const char *filename, const char *path)
 {
-       if (!is_submodule_initialized(path))
+       if (!is_submodule_active(the_repository, path))
                return 0;
        if (!is_submodule_populated_gently(path, NULL)) {
                /*