summaryrefslogtreecommitdiff
path: root/t/t4101
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2019-03-26 09:41:01 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-04-01 05:19:47 (GMT)
commit19e7fdaa582598fb915e0a421a14b559c06587fd (patch)
treed7ad476e8dcf548f1797566529ce46f0aa8c6b59 /t/t4101
parentaeb582a98374c094361cba1bd756dc6307432c42 (diff)
downloadgit-19e7fdaa582598fb915e0a421a14b559c06587fd.zip
git-19e7fdaa582598fb915e0a421a14b559c06587fd.tar.gz
git-19e7fdaa582598fb915e0a421a14b559c06587fd.tar.bz2
config: correct '**' matching in includeIf patterns
The current wildmatch() call for includeIf's gitdir pattern does not pass the WM_PATHNAME flag. Without this flag, '*' is treated _almost_ the same as '**' (because '*' also matches slashes) with one exception: '/**/' can match a single slash. The pattern 'foo/**/bar' matches 'foo/bar'. But '/*/', which is essentially what wildmatch engine sees without WM_PATHNAME, has to match two slashes (and '*' matches nothing). Which means 'foo/*/bar' cannot match 'foo/bar'. It can only match 'foo//bar'. The result of this is the current wildmatch() call works most of the time until the user depends on '/**/' matching no path component. And also '*' matches slashes while it should not, but people probably haven't noticed this yet. The fix is straightforward. Reported-by: Jason Karns <jason.karns@gmail.com> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4101')
0 files changed, 0 insertions, 0 deletions