From bf0231c66140be5194ac76a4a9f79e949c588293 Mon Sep 17 00:00:00 2001 From: Stefan Beller Date: Wed, 8 Mar 2017 15:07:42 -0800 Subject: rev-parse: add --show-superproject-working-tree In some situations it is useful to know if the given repository is a submodule of another repository. Add the flag --show-superproject-working-tree to git-rev-parse to make it easy to find out if there is a superproject. When no superproject exists, the output will be empty. Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano --- Documentation/git-rev-parse.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Documentation') diff --git a/Documentation/git-rev-parse.txt b/Documentation/git-rev-parse.txt index 91c02b8c85..c40c470448 100644 --- a/Documentation/git-rev-parse.txt +++ b/Documentation/git-rev-parse.txt @@ -261,6 +261,12 @@ print a message to stderr and exit with nonzero status. --show-toplevel:: Show the absolute path of the top-level directory. +--show-superproject-working-tree + Show the absolute path of the root of the superproject's + working tree (if exists) that uses the current repository as + its submodule. Outputs nothing if the current repository is + not used as a submodule by any project. + --shared-index-path:: Show the path to the shared index file in split index mode, or empty if not in split-index mode. -- cgit v1.2.3