summaryrefslogtreecommitdiff
path: root/t/t1305-config-include.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-04-26 06:39:05 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-04-26 06:39:05 (GMT)
commitc9672ba4c86a5fb18ea20d1c4a2c0eb6a731f3cb (patch)
tree47c0d32f51053046b1a47b3113d8803f2a7c1279 /t/t1305-config-include.sh
parent46bdfa3975665aaa9b7383466b529354d117e14d (diff)
parente145a0bc9b8711fe1c6cfad29af52ef06ce4c1ec (diff)
downloadgit-c9672ba4c86a5fb18ea20d1c4a2c0eb6a731f3cb.zip
git-c9672ba4c86a5fb18ea20d1c4a2c0eb6a731f3cb.tar.gz
git-c9672ba4c86a5fb18ea20d1c4a2c0eb6a731f3cb.tar.bz2
Merge branch 'nd/conditional-config-in-early-config'
The recently introduced conditional inclusion of configuration did not work well when early-config mechanism was involved. * nd/conditional-config-in-early-config: config: correct file reading order in read_early_config() config: handle conditional include when $GIT_DIR is not set up config: prepare to pass more info in git_config_with_options()
Diffstat (limited to 't/t1305-config-include.sh')
-rwxr-xr-xt/t1305-config-include.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/t/t1305-config-include.sh b/t/t1305-config-include.sh
index 8fbc7a0..933915e 100755
--- a/t/t1305-config-include.sh
+++ b/t/t1305-config-include.sh
@@ -218,6 +218,17 @@ test_expect_success 'conditional include, both unanchored, icase' '
)
'
+test_expect_success 'conditional include, early config reading' '
+ (
+ cd foo &&
+ echo "[includeIf \"gitdir:foo/\"]path=bar6" >>.git/config &&
+ echo "[test]six=6" >.git/bar6 &&
+ echo 6 >expect &&
+ test-config read_early_config test.six >actual &&
+ test_cmp expect actual
+ )
+'
+
test_expect_success SYMLINKS 'conditional include, set up symlinked $HOME' '
mkdir real-home &&
ln -s real-home home &&