{"thread":{"id":"45793","subject":"[PATCH] test: remove unused parameter from the wildmatch test","startedAt":"2017-04-25T09:45:13Z","lastAt":"2017-04-26T09:02:15Z","messageCount":4,"participants":["Ævar Arnfjörð Bjarmason","Junio C Hamano","Duy Nguyen"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"317792","messageId":"20170425094453.9823-1-avarab@gmail.com","threadId":"45793","inReplyTo":null,"subject":"[PATCH] test: remove unused parameter from the wildmatch test","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2017-04-25T09:44:53Z","receivedAt":"2017-04-25T09:45:13Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Remove the unused second parameter to the match() function. Since\ncommit 70a8fc999d (\"stop using fnmatch (either native or compat)\",\n2014-02-15) this hasn't been used, but was previously used to indicate\nok/fail if the fnmatch() backend was in use.\n\nThe \"x\" argument meant that the test would be skipped for\nfnmatch(). Support for that was implicitly added in commit\nfeabcc173b (\"Integrate wildmatch to git\", 2012-10-15) by leaving out\nan \"else\" condition, and made use of starting in commit\nb79c0c3755 (\"wildmatch: properly fold case everywhere\", 2013-05-30).\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n t/t3070-wildmatch.sh | 356 +++++++++++++++++++++++++--------------------------\n 1 file changed, 178 insertions(+), 178 deletions(-)\n\ndiff --git a/t/t3070-wildmatch.sh b/t/t3070-wildmatch.sh\nindex ef509df351..a54fe1845f 100755\n--- a/t/t3070-wildmatch.sh\n+++ b/t/t3070-wildmatch.sh\n@@ -6,12 +6,12 @@ test_description='wildmatch tests'\n \n match() {\n     if [ $1 = 1 ]; then\n-\ttest_expect_success \"wildmatch:     match '$3' '$4'\" \"\n-\t    test-wildmatch wildmatch '$3' '$4'\n+\ttest_expect_success \"wildmatch:     match '$2' '$3'\" \"\n+\t    test-wildmatch wildmatch '$2' '$3'\n \t\"\n     else\n-\ttest_expect_success \"wildmatch:  no match '$3' '$4'\" \"\n-\t    ! test-wildmatch wildmatch '$3' '$4'\n+\ttest_expect_success \"wildmatch:  no match '$2' '$3'\" \"\n+\t    ! test-wildmatch wildmatch '$2' '$3'\n \t\"\n     fi\n }\n@@ -41,176 +41,176 @@ pathmatch() {\n }\n \n # Basic wildmat features\n-match 1 1 foo foo\n-match 0 0 foo bar\n-match 1 1 '' \"\"\n-match 1 1 foo '???'\n-match 0 0 foo '??'\n-match 1 1 foo '*'\n-match 1 1 foo 'f*'\n-match 0 0 foo '*f'\n-match 1 1 foo '*foo*'\n-match 1 1 foobar '*ob*a*r*'\n-match 1 1 aaaaaaabababab '*ab'\n-match 1 1 'foo*' 'foo\\*'\n-match 0 0 foobar 'foo\\*bar'\n-match 1 1 'f\\oo' 'f\\\\oo'\n-match 1 1 ball '*[al]?'\n-match 0 0 ten '[ten]'\n-match 0 1 ten '**[!te]'\n-match 0 0 ten '**[!ten]'\n-match 1 1 ten 't[a-g]n'\n-match 0 0 ten 't[!a-g]n'\n-match 1 1 ton 't[!a-g]n'\n-match 1 1 ton 't[^a-g]n'\n-match 1 x 'a]b' 'a[]]b'\n-match 1 x a-b 'a[]-]b'\n-match 1 x 'a]b' 'a[]-]b'\n-match 0 x aab 'a[]-]b'\n-match 1 x aab 'a[]a-]b'\n-match 1 1 ']' ']'\n+match 1 foo foo\n+match 0 foo bar\n+match 1 '' \"\"\n+match 1 foo '???'\n+match 0 foo '??'\n+match 1 foo '*'\n+match 1 foo 'f*'\n+match 0 foo '*f'\n+match 1 foo '*foo*'\n+match 1 foobar '*ob*a*r*'\n+match 1 aaaaaaabababab '*ab'\n+match 1 'foo*' 'foo\\*'\n+match 0 foobar 'foo\\*bar'\n+match 1 'f\\oo' 'f\\\\oo'\n+match 1 ball '*[al]?'\n+match 0 ten '[ten]'\n+match 0 ten '**[!te]'\n+match 0 ten '**[!ten]'\n+match 1 ten 't[a-g]n'\n+match 0 ten 't[!a-g]n'\n+match 1 ton 't[!a-g]n'\n+match 1 ton 't[^a-g]n'\n+match 1 'a]b' 'a[]]b'\n+match 1 a-b 'a[]-]b'\n+match 1 'a]b' 'a[]-]b'\n+match 0 aab 'a[]-]b'\n+match 1 aab 'a[]a-]b'\n+match 1 ']' ']'\n \n # Extended slash-matching features\n-match 0 0 'foo/baz/bar' 'foo*bar'\n-match 0 0 'foo/baz/bar' 'foo**bar'\n-match 0 1 'foobazbar' 'foo**bar'\n-match 1 1 'foo/baz/bar' 'foo/**/bar'\n-match 1 0 'foo/baz/bar' 'foo/**/**/bar'\n-match 1 0 'foo/b/a/z/bar' 'foo/**/bar'\n-match 1 0 'foo/b/a/z/bar' 'foo/**/**/bar'\n-match 1 0 'foo/bar' 'foo/**/bar'\n-match 1 0 'foo/bar' 'foo/**/**/bar'\n-match 0 0 'foo/bar' 'foo?bar'\n-match 0 0 'foo/bar' 'foo[/]bar'\n-match 0 0 'foo/bar' 'f[^eiu][^eiu][^eiu][^eiu][^eiu]r'\n-match 1 1 'foo-bar' 'f[^eiu][^eiu][^eiu][^eiu][^eiu]r'\n-match 1 0 'foo' '**/foo'\n-match 1 x 'XXX/foo' '**/foo'\n-match 1 0 'bar/baz/foo' '**/foo'\n-match 0 0 'bar/baz/foo' '*/foo'\n-match 0 0 'foo/bar/baz' '**/bar*'\n-match 1 0 'deep/foo/bar/baz' '**/bar/*'\n-match 0 0 'deep/foo/bar/baz/' '**/bar/*'\n-match 1 0 'deep/foo/bar/baz/' '**/bar/**'\n-match 0 0 'deep/foo/bar' '**/bar/*'\n-match 1 0 'deep/foo/bar/' '**/bar/**'\n-match 0 0 'foo/bar/baz' '**/bar**'\n-match 1 0 'foo/bar/baz/x' '*/bar/**'\n-match 0 0 'deep/foo/bar/baz/x' '*/bar/**'\n-match 1 0 'deep/foo/bar/baz/x' '**/bar/*/*'\n+match 0 'foo/baz/bar' 'foo*bar'\n+match 0 'foo/baz/bar' 'foo**bar'\n+match 0 'foobazbar' 'foo**bar'\n+match 1 'foo/baz/bar' 'foo/**/bar'\n+match 1 'foo/baz/bar' 'foo/**/**/bar'\n+match 1 'foo/b/a/z/bar' 'foo/**/bar'\n+match 1 'foo/b/a/z/bar' 'foo/**/**/bar'\n+match 1 'foo/bar' 'foo/**/bar'\n+match 1 'foo/bar' 'foo/**/**/bar'\n+match 0 'foo/bar' 'foo?bar'\n+match 0 'foo/bar' 'foo[/]bar'\n+match 0 'foo/bar' 'f[^eiu][^eiu][^eiu][^eiu][^eiu]r'\n+match 1 'foo-bar' 'f[^eiu][^eiu][^eiu][^eiu][^eiu]r'\n+match 1 'foo' '**/foo'\n+match 1 'XXX/foo' '**/foo'\n+match 1 'bar/baz/foo' '**/foo'\n+match 0 'bar/baz/foo' '*/foo'\n+match 0 'foo/bar/baz' '**/bar*'\n+match 1 'deep/foo/bar/baz' '**/bar/*'\n+match 0 'deep/foo/bar/baz/' '**/bar/*'\n+match 1 'deep/foo/bar/baz/' '**/bar/**'\n+match 0 'deep/foo/bar' '**/bar/*'\n+match 1 'deep/foo/bar/' '**/bar/**'\n+match 0 'foo/bar/baz' '**/bar**'\n+match 1 'foo/bar/baz/x' '*/bar/**'\n+match 0 'deep/foo/bar/baz/x' '*/bar/**'\n+match 1 'deep/foo/bar/baz/x' '**/bar/*/*'\n \n # Various additional tests\n-match 0 0 'acrt' 'a[c-c]st'\n-match 1 1 'acrt' 'a[c-c]rt'\n-match 0 0 ']' '[!]-]'\n-match 1 x 'a' '[!]-]'\n-match 0 0 '' '\\'\n-match 0 x '\\' '\\'\n-match 0 x 'XXX/\\' '*/\\'\n-match 1 x 'XXX/\\' '*/\\\\'\n-match 1 1 'foo' 'foo'\n-match 1 1 '@foo' '@foo'\n-match 0 0 'foo' '@foo'\n-match 1 1 '[ab]' '\\[ab]'\n-match 1 1 '[ab]' '[[]ab]'\n-match 1 x '[ab]' '[[:]ab]'\n-match 0 x '[ab]' '[[::]ab]'\n-match 1 x '[ab]' '[[:digit]ab]'\n-match 1 x '[ab]' '[\\[:]ab]'\n-match 1 1 '?a?b' '\\??\\?b'\n-match 1 1 'abc' '\\a\\b\\c'\n-match 0 0 'foo' ''\n-match 1 0 'foo/bar/baz/to' '**/t[o]'\n+match 0 'acrt' 'a[c-c]st'\n+match 1 'acrt' 'a[c-c]rt'\n+match 0 ']' '[!]-]'\n+match 1 'a' '[!]-]'\n+match 0 '' '\\'\n+match 0 '\\' '\\'\n+match 0 'XXX/\\' '*/\\'\n+match 1 'XXX/\\' '*/\\\\'\n+match 1 'foo' 'foo'\n+match 1 '@foo' '@foo'\n+match 0 'foo' '@foo'\n+match 1 '[ab]' '\\[ab]'\n+match 1 '[ab]' '[[]ab]'\n+match 1 '[ab]' '[[:]ab]'\n+match 0 '[ab]' '[[::]ab]'\n+match 1 '[ab]' '[[:digit]ab]'\n+match 1 '[ab]' '[\\[:]ab]'\n+match 1 '?a?b' '\\??\\?b'\n+match 1 'abc' '\\a\\b\\c'\n+match 0 'foo' ''\n+match 1 'foo/bar/baz/to' '**/t[o]'\n \n # Character class tests\n-match 1 x 'a1B' '[[:alpha:]][[:digit:]][[:upper:]]'\n-match 0 x 'a' '[[:digit:][:upper:][:space:]]'\n-match 1 x 'A' '[[:digit:][:upper:][:space:]]'\n-match 1 x '1' '[[:digit:][:upper:][:space:]]'\n-match 0 x '1' '[[:digit:][:upper:][:spaci:]]'\n-match 1 x ' ' '[[:digit:][:upper:][:space:]]'\n-match 0 x '.' '[[:digit:][:upper:][:space:]]'\n-match 1 x '.' '[[:digit:][:punct:][:space:]]'\n-match 1 x '5' '[[:xdigit:]]'\n-match 1 x 'f' '[[:xdigit:]]'\n-match 1 x 'D' '[[:xdigit:]]'\n-match 1 x '_' '[[:alnum:][:alpha:][:blank:][:cntrl:][:digit:][:graph:][:lower:][:print:][:punct:][:space:][:upper:][:xdigit:]]'\n-match 1 x '_' '[[:alnum:][:alpha:][:blank:][:cntrl:][:digit:][:graph:][:lower:][:print:][:punct:][:space:][:upper:][:xdigit:]]'\n-match 1 x '.' '[^[:alnum:][:alpha:][:blank:][:cntrl:][:digit:][:lower:][:space:][:upper:][:xdigit:]]'\n-match 1 x '5' '[a-c[:digit:]x-z]'\n-match 1 x 'b' '[a-c[:digit:]x-z]'\n-match 1 x 'y' '[a-c[:digit:]x-z]'\n-match 0 x 'q' '[a-c[:digit:]x-z]'\n+match 1 'a1B' '[[:alpha:]][[:digit:]][[:upper:]]'\n+match 0 'a' '[[:digit:][:upper:][:space:]]'\n+match 1 'A' '[[:digit:][:upper:][:space:]]'\n+match 1 '1' '[[:digit:][:upper:][:space:]]'\n+match 0 '1' '[[:digit:][:upper:][:spaci:]]'\n+match 1 ' ' '[[:digit:][:upper:][:space:]]'\n+match 0 '.' '[[:digit:][:upper:][:space:]]'\n+match 1 '.' '[[:digit:][:punct:][:space:]]'\n+match 1 '5' '[[:xdigit:]]'\n+match 1 'f' '[[:xdigit:]]'\n+match 1 'D' '[[:xdigit:]]'\n+match 1 '_' '[[:alnum:][:alpha:][:blank:][:cntrl:][:digit:][:graph:][:lower:][:print:][:punct:][:space:][:upper:][:xdigit:]]'\n+match 1 '_' '[[:alnum:][:alpha:][:blank:][:cntrl:][:digit:][:graph:][:lower:][:print:][:punct:][:space:][:upper:][:xdigit:]]'\n+match 1 '.' '[^[:alnum:][:alpha:][:blank:][:cntrl:][:digit:][:lower:][:space:][:upper:][:xdigit:]]'\n+match 1 '5' '[a-c[:digit:]x-z]'\n+match 1 'b' '[a-c[:digit:]x-z]'\n+match 1 'y' '[a-c[:digit:]x-z]'\n+match 0 'q' '[a-c[:digit:]x-z]'\n \n # Additional tests, including some malformed wildmats\n-match 1 x ']' '[\\\\-^]'\n-match 0 0 '[' '[\\\\-^]'\n-match 1 x '-' '[\\-_]'\n-match 1 x ']' '[\\]]'\n-match 0 0 '\\]' '[\\]]'\n-match 0 0 '\\' '[\\]]'\n-match 0 0 'ab' 'a[]b'\n-match 0 x 'a[]b' 'a[]b'\n-match 0 x 'ab[' 'ab['\n-match 0 0 'ab' '[!'\n-match 0 0 'ab' '[-'\n-match 1 1 '-' '[-]'\n-match 0 0 '-' '[a-'\n-match 0 0 '-' '[!a-'\n-match 1 x '-' '[--A]'\n-match 1 x '5' '[--A]'\n-match 1 1 ' ' '[ --]'\n-match 1 1 '$' '[ --]'\n-match 1 1 '-' '[ --]'\n-match 0 0 '0' '[ --]'\n-match 1 x '-' '[---]'\n-match 1 x '-' '[------]'\n-match 0 0 'j' '[a-e-n]'\n-match 1 x '-' '[a-e-n]'\n-match 1 x 'a' '[!------]'\n-match 0 0 '[' '[]-a]'\n-match 1 x '^' '[]-a]'\n-match 0 0 '^' '[!]-a]'\n-match 1 x '[' '[!]-a]'\n-match 1 1 '^' '[a^bc]'\n-match 1 x '-b]' '[a-]b]'\n-match 0 0 '\\' '[\\]'\n-match 1 1 '\\' '[\\\\]'\n-match 0 0 '\\' '[!\\\\]'\n-match 1 1 'G' '[A-\\\\]'\n-match 0 0 'aaabbb' 'b*a'\n-match 0 0 'aabcaa' '*ba*'\n-match 1 1 ',' '[,]'\n-match 1 1 ',' '[\\\\,]'\n-match 1 1 '\\' '[\\\\,]'\n-match 1 1 '-' '[,-.]'\n-match 0 0 '+' '[,-.]'\n-match 0 0 '-.]' '[,-.]'\n-match 1 1 '2' '[\\1-\\3]'\n-match 1 1 '3' '[\\1-\\3]'\n-match 0 0 '4' '[\\1-\\3]'\n-match 1 1 '\\' '[[-\\]]'\n-match 1 1 '[' '[[-\\]]'\n-match 1 1 ']' '[[-\\]]'\n-match 0 0 '-' '[[-\\]]'\n+match 1 ']' '[\\\\-^]'\n+match 0 '[' '[\\\\-^]'\n+match 1 '-' '[\\-_]'\n+match 1 ']' '[\\]]'\n+match 0 '\\]' '[\\]]'\n+match 0 '\\' '[\\]]'\n+match 0 'ab' 'a[]b'\n+match 0 'a[]b' 'a[]b'\n+match 0 'ab[' 'ab['\n+match 0 'ab' '[!'\n+match 0 'ab' '[-'\n+match 1 '-' '[-]'\n+match 0 '-' '[a-'\n+match 0 '-' '[!a-'\n+match 1 '-' '[--A]'\n+match 1 '5' '[--A]'\n+match 1 ' ' '[ --]'\n+match 1 '$' '[ --]'\n+match 1 '-' '[ --]'\n+match 0 '0' '[ --]'\n+match 1 '-' '[---]'\n+match 1 '-' '[------]'\n+match 0 'j' '[a-e-n]'\n+match 1 '-' '[a-e-n]'\n+match 1 'a' '[!------]'\n+match 0 '[' '[]-a]'\n+match 1 '^' '[]-a]'\n+match 0 '^' '[!]-a]'\n+match 1 '[' '[!]-a]'\n+match 1 '^' '[a^bc]'\n+match 1 '-b]' '[a-]b]'\n+match 0 '\\' '[\\]'\n+match 1 '\\' '[\\\\]'\n+match 0 '\\' '[!\\\\]'\n+match 1 'G' '[A-\\\\]'\n+match 0 'aaabbb' 'b*a'\n+match 0 'aabcaa' '*ba*'\n+match 1 ',' '[,]'\n+match 1 ',' '[\\\\,]'\n+match 1 '\\' '[\\\\,]'\n+match 1 '-' '[,-.]'\n+match 0 '+' '[,-.]'\n+match 0 '-.]' '[,-.]'\n+match 1 '2' '[\\1-\\3]'\n+match 1 '3' '[\\1-\\3]'\n+match 0 '4' '[\\1-\\3]'\n+match 1 '\\' '[[-\\]]'\n+match 1 '[' '[[-\\]]'\n+match 1 ']' '[[-\\]]'\n+match 0 '-' '[[-\\]]'\n \n # Test recursion and the abort code (use \"wildtest -i\" to see iteration counts)\n-match 1 1 '-adobe-courier-bold-o-normal--12-120-75-75-m-70-iso8859-1' '-*-*-*-*-*-*-12-*-*-*-m-*-*-*'\n-match 0 0 '-adobe-courier-bold-o-normal--12-120-75-75-X-70-iso8859-1' '-*-*-*-*-*-*-12-*-*-*-m-*-*-*'\n-match 0 0 '-adobe-courier-bold-o-normal--12-120-75-75-/-70-iso8859-1' '-*-*-*-*-*-*-12-*-*-*-m-*-*-*'\n-match 1 1 'XXX/adobe/courier/bold/o/normal//12/120/75/75/m/70/iso8859/1' 'XXX/*/*/*/*/*/*/12/*/*/*/m/*/*/*'\n-match 0 0 'XXX/adobe/courier/bold/o/normal//12/120/75/75/X/70/iso8859/1' 'XXX/*/*/*/*/*/*/12/*/*/*/m/*/*/*'\n-match 1 0 'abcd/abcdefg/abcdefghijk/abcdefghijklmnop.txt' '**/*a*b*g*n*t'\n-match 0 0 'abcd/abcdefg/abcdefghijk/abcdefghijklmnop.txtz' '**/*a*b*g*n*t'\n-match 0 x foo '*/*/*'\n-match 0 x foo/bar '*/*/*'\n-match 1 x foo/bba/arr '*/*/*'\n-match 0 x foo/bb/aa/rr '*/*/*'\n-match 1 x foo/bb/aa/rr '**/**/**'\n-match 1 x abcXdefXghi '*X*i'\n-match 0 x ab/cXd/efXg/hi '*X*i'\n-match 1 x ab/cXd/efXg/hi '*/*X*/*/*i'\n-match 1 x ab/cXd/efXg/hi '**/*X*/**/*i'\n+match 1 '-adobe-courier-bold-o-normal--12-120-75-75-m-70-iso8859-1' '-*-*-*-*-*-*-12-*-*-*-m-*-*-*'\n+match 0 '-adobe-courier-bold-o-normal--12-120-75-75-X-70-iso8859-1' '-*-*-*-*-*-*-12-*-*-*-m-*-*-*'\n+match 0 '-adobe-courier-bold-o-normal--12-120-75-75-/-70-iso8859-1' '-*-*-*-*-*-*-12-*-*-*-m-*-*-*'\n+match 1 'XXX/adobe/courier/bold/o/normal//12/120/75/75/m/70/iso8859/1' 'XXX/*/*/*/*/*/*/12/*/*/*/m/*/*/*'\n+match 0 'XXX/adobe/courier/bold/o/normal//12/120/75/75/X/70/iso8859/1' 'XXX/*/*/*/*/*/*/12/*/*/*/m/*/*/*'\n+match 1 'abcd/abcdefg/abcdefghijk/abcdefghijklmnop.txt' '**/*a*b*g*n*t'\n+match 0 'abcd/abcdefg/abcdefghijk/abcdefghijklmnop.txtz' '**/*a*b*g*n*t'\n+match 0 foo '*/*/*'\n+match 0 foo/bar '*/*/*'\n+match 1 foo/bba/arr '*/*/*'\n+match 0 foo/bb/aa/rr '*/*/*'\n+match 1 foo/bb/aa/rr '**/**/**'\n+match 1 abcXdefXghi '*X*i'\n+match 0 ab/cXd/efXg/hi '*X*i'\n+match 1 ab/cXd/efXg/hi '*/*X*/*/*i'\n+match 1 ab/cXd/efXg/hi '**/*X*/**/*i'\n \n pathmatch 1 foo foo\n pathmatch 0 foo fo\n@@ -235,20 +235,20 @@ pathmatch 1 ab/cXd/efXg/hi '*/*X*/*/*i'\n pathmatch 1 ab/cXd/efXg/hi '*Xg*i'\n \n # Case-sensitivy features\n-match 0 x 'a' '[A-Z]'\n-match 1 x 'A' '[A-Z]'\n-match 0 x 'A' '[a-z]'\n-match 1 x 'a' '[a-z]'\n-match 0 x 'a' '[[:upper:]]'\n-match 1 x 'A' '[[:upper:]]'\n-match 0 x 'A' '[[:lower:]]'\n-match 1 x 'a' '[[:lower:]]'\n-match 0 x 'A' '[B-Za]'\n-match 1 x 'a' '[B-Za]'\n-match 0 x 'A' '[B-a]'\n-match 1 x 'a' '[B-a]'\n-match 0 x 'z' '[Z-y]'\n-match 1 x 'Z' '[Z-y]'\n+match 0 'a' '[A-Z]'\n+match 1 'A' '[A-Z]'\n+match 0 'A' '[a-z]'\n+match 1 'a' '[a-z]'\n+match 0 'a' '[[:upper:]]'\n+match 1 'A' '[[:upper:]]'\n+match 0 'A' '[[:lower:]]'\n+match 1 'a' '[[:lower:]]'\n+match 0 'A' '[B-Za]'\n+match 1 'a' '[B-Za]'\n+match 0 'A' '[B-a]'\n+match 1 'a' '[B-a]'\n+match 0 'z' '[Z-y]'\n+match 1 'Z' '[Z-y]'\n \n imatch 1 'a' '[A-Z]'\n imatch 1 'A' '[A-Z]'\n-- \n2.11.0\n\n"},{"id":"317793","messageId":"CACBZZX7x0hSy5PTCo1Cf0Hp09jBhnSF0T=BseH68kwMRmqGJig@mail.gmail.com","threadId":"45793","inReplyTo":"20170425094453.9823-1-avarab@gmail.com","subject":"Re: [PATCH] test: remove unused parameter from the wildmatch test","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2017-04-25T09:51:47Z","receivedAt":"2017-04-25T09:52:13Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"On Tue, Apr 25, 2017 at 11:44 AM, Ævar Arnfjörð Bjarmason\n<avarab@gmail.com> wrote:\n> Remove the unused second parameter to the match() function. Since\n> commit 70a8fc999d (\"stop using fnmatch (either native or compat)\",\n> 2014-02-15) this hasn't been used, but was previously used to indicate\n> ok/fail if the fnmatch() backend was in use.\n>\n> The \"x\" argument meant that the test would be skipped for\n> fnmatch(). Support for that was implicitly added in commit\n> feabcc173b (\"Integrate wildmatch to git\", 2012-10-15) by leaving out\n> an \"else\" condition, and made use of starting in commit\n> b79c0c3755 (\"wildmatch: properly fold case everywhere\", 2013-05-30).\n>\n> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n> ---\n\nRight now this is all dead code, but I wonder if instead we should be\npartially reverting commit 70a8fc999d (\"stop using fnmatch (either\nnative or compat)\", 2014-02-15) by Duy to the extent of being able to\nextend t/helper/test-wildmatch.c to test fnmatch() as well.\n\nWe wouldn't be using fnmatch(), but I think it's a probably a good\nidea for the tests to support a mode where we have to declare\nexplicitly whether something should also match under fnmatch or not,\nso we document the differences.\n"},{"id":"317898","messageId":"xmqqlgqnstod.fsf@gitster.mtv.corp.google.com","threadId":"45793","inReplyTo":"CACBZZX7x0hSy5PTCo1Cf0Hp09jBhnSF0T=BseH68kwMRmqGJig@mail.gmail.com","subject":"Re: [PATCH] test: remove unused parameter from the wildmatch test","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2017-04-26T04:02:10Z","receivedAt":"2017-04-26T04:02:17Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:\n\n> Right now this is all dead code, but I wonder if instead we should be\n> partially reverting commit 70a8fc999d (\"stop using fnmatch (either\n> native or compat)\", 2014-02-15) by Duy to the extent of being able to\n> extend t/helper/test-wildmatch.c to test fnmatch() as well.\n>\n> We wouldn't be using fnmatch(), but I think it's a probably a good\n> idea for the tests to support a mode where we have to declare\n> explicitly whether something should also match under fnmatch or not,\n> so we document the differences.\n\nI am on the fence and can go either way.  What you suggest is\nintellectually intriguing even though I am unsure of its practical\nvalue.\n"},{"id":"317909","messageId":"CACsJy8DDDG0YKsXG8JWhowJ7TOH7Psw6v8B3AHA-dTpCHs+vYA@mail.gmail.com","threadId":"45793","inReplyTo":"CACBZZX7x0hSy5PTCo1Cf0Hp09jBhnSF0T=BseH68kwMRmqGJig@mail.gmail.com","subject":"Re: [PATCH] test: remove unused parameter from the wildmatch test","fromName":"Duy Nguyen","fromEmail":"pclouds@gmail.com","sentAt":"2017-04-26T09:00:06Z","receivedAt":"2017-04-26T09:02:15Z","isPatch":true,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On Tue, Apr 25, 2017 at 4:51 PM, Ævar Arnfjörð Bjarmason\n<avarab@gmail.com> wrote:\n> We wouldn't be using fnmatch(), but I think it's a probably a good\n> idea for the tests to support a mode where we have to declare\n> explicitly whether something should also match under fnmatch or not,\n> so we document the differences.\n\nIt was that way for a while (when wildmatch code was still \"young\")\nthen we removed fnmatch tests because system fnmatch was inconsistent\nin some corner cases and because wildmatch code did not change much\nanymore.\n\nIf we start turning it upside down, yes some sort of checks like that\nmay be a good idea (or at least until new code stablizes again).\n-- \nDuy\n"}]}