Merge branch 'nd/include-if-wildmatch'
A buglet in configuration parser has been fixed. * nd/include-if-wildmatch: config: correct '**' matching in includeIf patterns
This commit is contained in:
commit
078b254deb
2
config.c
2
config.c
@ -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) {
|
||||
/*
|
||||
|
@ -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 &&
|
||||
|
Loading…
Reference in New Issue
Block a user