hook: use correct logical variable
[gitweb.git] / builtin / grep.c
index f61a9d938b44424414812c57eecc309bd563f4b3..fa351c49f4fd74b3cde1703ef98dba5f0c2c4e8f 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,11 +644,11 @@ 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)) {
                /*
-                * If searching history, check for the presense of the
+                * If searching history, check for the presence of the
                 * submodule's gitdir before skipping the submodule.
                 */
                if (oid) {