diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2012-10-15 13:26:00 +0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-10-15 14:58:18 -0700 |
commit | 40bbee0ab07d0ee4f21b11d597c878245c1b05a6 (patch) | |
tree | a966918d4df85bb7a398d4b37286b4ba731b7e98 /commit.h | |
parent | wildmatch: fix case-insensitive matching (diff) | |
download | tgif-40bbee0ab07d0ee4f21b11d597c878245c1b05a6.tar.xz |
wildmatch: adjust "**" behavior
Standard wildmatch() sees consecutive asterisks as "*" that can also
match slashes. But that may be hard to explain to users as
"abc/**/def" can match "abcdef", "abcxyzdef", "abc/def", "abc/x/def",
"abc/x/y/def"...
This patch changes wildmatch so that users can do
- "**/def" -> all paths ending with file/directory 'def'
- "abc/**" - equivalent to "/abc/"
- "abc/**/def" -> "abc/x/def", "abc/x/y/def"...
- otherwise consider the pattern malformed if "**" is found
Basically the magic of "**" only remains if it's wrapped around by
slashes.
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 'commit.h')
0 files changed, 0 insertions, 0 deletions