diff options
| author | Junio C Hamano <gitster@pobox.com> | 2025-11-03 06:49:54 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-11-03 06:49:55 -0800 |
| commit | 52364670907b84f91bcd42035ddd30ceac0f2771 (patch) | |
| tree | 751b986b35c369f8f65dc0147e679b5f201a1d0a /t | |
| parent | Merge branch 'kh/doc-patch-id-1' (diff) | |
| parent | match_pathname(): give fnmatch one char of prefix context (diff) | |
| download | git-52364670907b84f91bcd42035ddd30ceac0f2771.tar.gz git-52364670907b84f91bcd42035ddd30ceac0f2771.zip | |
Merge branch 'jk/match-pathname-fix'
The wildmatch code had a corner case bug that mistakenly makes
"foo**/bar" match with "foobar", which has been corrected.
* jk/match-pathname-fix:
match_pathname(): give fnmatch one char of prefix context
match_pathname(): reorder prefix-match check
Diffstat (limited to 't')
| -rwxr-xr-x | t/t0008-ignores.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/t/t0008-ignores.sh b/t/t0008-ignores.sh index 273d71411f..db8bde280e 100755 --- a/t/t0008-ignores.sh +++ b/t/t0008-ignores.sh @@ -847,6 +847,17 @@ test_expect_success 'directories and ** matches' ' test_cmp expect actual ' +test_expect_success '** not confused by matching leading prefix' ' + cat >.gitignore <<-\EOF && + foo**/bar + EOF + git check-ignore foobar foo/bar >actual && + cat >expect <<-\EOF && + foo/bar + EOF + test_cmp expect actual +' + ############################################################################ # # test whitespace handling |
