summaryrefslogtreecommitdiff
path: root/builtin/grep.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2017-07-05 13:32:55 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-07-05 13:32:56 -0700
commit85ce4a6828a418a22c69a870b3e059481b4263d6 (patch)
tree6775adbc2f52165f56cd758820c78f201f349ef3 /builtin/grep.c
parentThirteenth batch for 2.14 (diff)
parentls-files: use repository object (diff)
downloadtgif-85ce4a6828a418a22c69a870b3e059481b4263d6.tar.xz
Merge branch 'bw/repo-object'
Introduce a "repository" object to eventually make it easier to work in multiple repositories (the primary focus is to work with the superproject and its submodules) in a single process. * bw/repo-object: ls-files: use repository object repository: enable initialization of submodules submodule: convert is_submodule_initialized to work on a repository submodule: add repo_read_gitmodules submodule-config: store the_submodule_cache in the_repository repository: add index_state to struct repo config: read config from a repository object path: add repo_worktree_path and strbuf_repo_worktree_path path: add repo_git_path and strbuf_repo_git_path path: worktree_git_path() should not use file relocation path: convert do_git_path to take a 'struct repository' path: convert strbuf_git_common_path to take a 'struct repository' path: always pass in commondir to update_common_dir path: create path.h environment: store worktree in the_repository environment: place key repository state in the_repository repository: introduce the repository object environment: remove namespace_len variable setup: add comment indicating a hack setup: don't perform lazy initialization of repository state
Diffstat (limited to 'builtin/grep.c')
-rw-r--r--builtin/grep.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin/grep.c b/builtin/grep.c
index f752f642ff..fa351c49f4 100644
--- a/builtin/grep.c
+++ b/builtin/grep.c
@@ -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)) {
/*