diff options
author | Jeff King <peff@peff.net> | 2012-04-25 08:00:36 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-04-29 17:46:32 -0700 |
commit | 4c0a89fcde219df8db8fdb9635ef2ef40d002a6e (patch) | |
tree | bc2f0008d9770ff20e56b0baf3e096cdf2230e01 /Documentation/config.txt | |
parent | e8dde3e5f9ddb7cf95a6ff3cea6cf07c3a2db80d (diff) | |
download | git-4c0a89fcde219df8db8fdb9635ef2ef40d002a6e.tar.gz |
config: expand tildes in include.path variable
You can already use relative paths in include.path, which
means that including "foo" from your global "~/.gitconfig"
will look in your home directory. However, you might want to
do something clever like putting "~/.gitconfig-foo" in a
specific repository's config file.
Signed-off-by: Jeff King <peff@peff.net>
Acked-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/config.txt')
-rw-r--r-- | Documentation/config.txt | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Documentation/config.txt b/Documentation/config.txt index c081657be7..e67c8ef369 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -95,7 +95,9 @@ included file is expanded immediately, as if its contents had been found at the location of the include directive. If the value of the `include.path` variable is a relative path, the path is considered to be relative to the configuration file in which the include directive was -found. See below for examples. +found. The value of `include.path` is subject to tilde expansion: `{tilde}/` +is expanded to the value of `$HOME`, and `{tilde}user/` to the specified +user's home directory. See below for examples. Example ~~~~~~~ @@ -122,6 +124,7 @@ Example [include] path = /path/to/foo.inc ; include by absolute path path = foo ; expand "foo" relative to the current file + path = ~/foo ; expand "foo" in your $HOME directory Variables ~~~~~~~~~ |