summaryrefslogtreecommitdiff
path: root/repository.h
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2017-08-22 10:29:01 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-08-22 10:29:01 -0700
commit5aa0b6c506c1f1336d0e713bf8225509e9ebb9f5 (patch)
treea0eaaf3110e43b2a4aec5f7023fbf62a655418de /repository.h
parentMerge branch 'pw/sequence-rerere-autoupdate' (diff)
parentgrep: recurse in-process using 'struct repository' (diff)
downloadtgif-5aa0b6c506c1f1336d0e713bf8225509e9ebb9f5.tar.xz
Merge branch 'bw/grep-recurse-submodules'
"git grep --recurse-submodules" has been reworked to give a more consistent output across submodule boundary (and do its thing without having to fork a separate process). * bw/grep-recurse-submodules: grep: recurse in-process using 'struct repository' submodule: merge repo_read_gitmodules and gitmodules_config submodule: check for unmerged .gitmodules outside of config parsing submodule: check for unstaged .gitmodules outside of config parsing submodule: remove fetch.recursesubmodules from submodule-config parsing submodule: remove submodule.fetchjobs from submodule-config parsing config: add config_from_gitmodules cache.h: add GITMODULES_FILE macro repository: have the_repository use the_index repo_read_index: don't discard the index
Diffstat (limited to 'repository.h')
-rw-r--r--repository.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/repository.h b/repository.h
index 417787f3ef..7f5e24a0a2 100644
--- a/repository.h
+++ b/repository.h
@@ -92,6 +92,14 @@ extern int repo_submodule_init(struct repository *submodule,
const char *path);
extern void repo_clear(struct repository *repo);
+/*
+ * Populates the repository's index from its index_file, an index struct will
+ * be allocated if needed.
+ *
+ * Return the number of index entries in the populated index or a value less
+ * than zero if an error occured. If the repository's index has already been
+ * populated then the number of entries will simply be returned.
+ */
extern int repo_read_index(struct repository *repo);
#endif /* REPOSITORY_H */