diff options
| author | Junio C Hamano <gitster@pobox.com> | 2019-04-22 11:14:45 +0900 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2019-04-22 11:14:46 +0900 |
| commit | 078b254deb62d86c469c87ba4200c5a46fcb3a95 (patch) | |
| tree | 445a5f8556bba93f72180bc867167e9f3f6af17e | |
| parent | 6b42805445c3b5714c100ac066697943f2571fd3 (diff) | |
| parent | 19e7fdaa582598fb915e0a421a14b559c06587fd (diff) | |
| download | git-078b254deb62d86c469c87ba4200c5a46fcb3a95.tar.gz | |
Merge branch 'nd/include-if-wildmatch'
A buglet in configuration parser has been fixed.
* nd/include-if-wildmatch:
config: correct '**' matching in includeIf patterns
| -rw-r--r-- | config.c | 2 | ||||
| -rwxr-xr-x | t/t1305-config-include.sh | 13 |
2 files changed, 14 insertions, 1 deletions
@@ -242,7 +242,7 @@ again: } ret = !wildmatch(pattern.buf + prefix, text.buf + prefix, - icase ? WM_CASEFOLD : 0); + WM_PATHNAME | (icase ? WM_CASEFOLD : 0)); if (!ret && !already_tried_absolute) { /* diff --git a/t/t1305-config-include.sh b/t/t1305-config-include.sh index 635918505d..579a86b7f8 100755 --- a/t/t1305-config-include.sh +++ b/t/t1305-config-include.sh @@ -229,6 +229,19 @@ test_expect_success 'conditional include, early config reading' ' ) ' +test_expect_success 'conditional include with /**/' ' + REPO=foo/bar/repo && + git init $REPO && + cat >>$REPO/.git/config <<-\EOF && + [includeIf "gitdir:**/foo/**/bar/**"] + path=bar7 + EOF + echo "[test]seven=7" >$REPO/.git/bar7 && + echo 7 >expect && + git -C $REPO config test.seven >actual && + test_cmp expect actual +' + test_expect_success SYMLINKS 'conditional include, set up symlinked $HOME' ' mkdir real-home && ln -s real-home home && |
