]> git.ipfire.org Git - thirdparty/git.git/commit
git: make super-prefix option
authorBrandon Williams <bmwill@google.com>
Fri, 7 Oct 2016 18:18:48 +0000 (11:18 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 10 Oct 2016 19:14:58 +0000 (12:14 -0700)
commit74866d75793559e8b351a17100679f83b96972ca
tree136607f717aac8848ec195727452df9296e18267
parent35f6318d44379452d8d33e880d8df0267b4a0cd0
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>
Documentation/git.txt
cache.h
environment.c
git.c