summaryrefslogtreecommitdiff
path: root/Documentation/git.txt
diff options
context:
space:
mode:
authorBrandon Williams <bmwill@google.com>2016-10-07 18:18:48 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-10-10 19:14:58 (GMT)
commit74866d75793559e8b351a17100679f83b96972ca (patch)
tree136607f717aac8848ec195727452df9296e18267 /Documentation/git.txt
parent35f6318d44379452d8d33e880d8df0267b4a0cd0 (diff)
downloadgit-74866d75793559e8b351a17100679f83b96972ca.zip
git-74866d75793559e8b351a17100679f83b96972ca.tar.gz
git-74866d75793559e8b351a17100679f83b96972ca.tar.bz2
git: make super-prefix option
Add a super-prefix environment variable 'GIT_INTERNAL_SUPER_PREFIX' which can be used to specify a path from above a repository down to its root. When such a super-prefix is specified, the paths reported by Git are prefixed with it to make them relative to that directory "above". The paths given by the user on the command line (e.g. "git subcmd --output-file=path/to/a/file" and pathspecs) are taken relative to the directory "above" to match. The immediate use of this option is by commands which have a --recurse-submodule option in order to give context to submodules about how they were invoked. This option is currently only allowed for builtins which support a super-prefix. Signed-off-by: Brandon Williams <bmwill@google.com> Reviewed-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git.txt')
-rw-r--r--Documentation/git.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/Documentation/git.txt b/Documentation/git.txt
index 7913fc2..2188ae6 100644
--- a/Documentation/git.txt
+++ b/Documentation/git.txt
@@ -13,6 +13,7 @@ SYNOPSIS
[--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
[-p|--paginate|--no-pager] [--no-replace-objects] [--bare]
[--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
+ [--super-prefix=<path>]
<command> [<args>]
DESCRIPTION
@@ -601,6 +602,11 @@ foo.bar= ...`) sets `foo.bar` to the empty string.
details. Equivalent to setting the `GIT_NAMESPACE` environment
variable.
+--super-prefix=<path>::
+ Currently for internal use only. Set a prefix which gives a path from
+ above a repository down to its root. One use is to give submodules
+ context about the superproject that invoked it.
+
--bare::
Treat the repository as a bare repository. If GIT_DIR
environment is not set, it is set to the current working