diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-03-17 13:50:25 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-03-17 13:50:25 -0700 |
commit | 3edcc048621fee389be6991c90b6a7dd0386c57e (patch) | |
tree | 936f84111d29e56d42f008999fa3818823853855 /submodule.h | |
parent | Merge branch 'bc/object-id' (diff) | |
parent | rev-parse: add --show-superproject-working-tree (diff) | |
download | tgif-3edcc048621fee389be6991c90b6a7dd0386c57e.tar.xz |
Merge branch 'sb/rev-parse-show-superproject-root'
From a working tree of a repository, a new option of "rev-parse"
lets you ask if the repository is used as a submodule of another
project, and where the root level of the working tree of that
project (i.e. your superproject) is.
* sb/rev-parse-show-superproject-root:
rev-parse: add --show-superproject-working-tree
Diffstat (limited to 'submodule.h')
-rw-r--r-- | submodule.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/submodule.h b/submodule.h index 05ab674f06..c8a0c9cb29 100644 --- a/submodule.h +++ b/submodule.h @@ -93,4 +93,12 @@ extern void prepare_submodule_repo_env(struct argv_array *out); extern void absorb_git_dir_into_superproject(const char *prefix, const char *path, unsigned flags); + +/* + * Return the absolute path of the working tree of the superproject, which this + * project is a submodule of. If this repository is not a submodule of + * another repository, return NULL. + */ +extern const char *get_superproject_working_tree(void); + #endif |