Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2012-04-25 16:00:36 +0400
committerJunio C Hamano <gitster@pobox.com>2012-04-30 04:46:32 +0400
commit4c0a89fcde219df8db8fdb9635ef2ef40d002a6e (patch)
treebc2f0008d9770ff20e56b0baf3e096cdf2230e01 /t/t1305-config-include.sh
parente8dde3e5f9ddb7cf95a6ff3cea6cf07c3a2db80d (diff)
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 't/t1305-config-include.sh')
-rwxr-xr-xt/t1305-config-include.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/t/t1305-config-include.sh b/t/t1305-config-include.sh
index 4b1cbaa028..a70707620f 100755
--- a/t/t1305-config-include.sh
+++ b/t/t1305-config-include.sh
@@ -29,6 +29,14 @@ test_expect_success 'chained relative paths' '
test_cmp expect actual
'
+test_expect_success 'include paths get tilde-expansion' '
+ echo "[test]one = 1" >one &&
+ echo "[include]path = ~/one" >.gitconfig &&
+ echo 1 >expect &&
+ git config test.one >actual &&
+ test_cmp expect actual
+'
+
test_expect_success 'include options can still be examined' '
echo "[test]one = 1" >one &&
echo "[include]path = one" >.gitconfig &&