{"thread":{"id":"46719","subject":"[PATCH] match_name_as_path: Pass WM_CASEFOLD to wildmatch","startedAt":"2017-09-07T13:51:54Z","lastAt":"2017-09-07T14:50:51Z","messageCount":2,"participants":["Aleksandr Makarov","Jeff King"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"327704","messageId":"79c946a2-532e-1c9b-7bf2-1f1ccbff721e@gmail.com","threadId":"46719","inReplyTo":null,"subject":"[PATCH] match_name_as_path: Pass WM_CASEFOLD to wildmatch","fromName":"Aleksandr Makarov","fromEmail":"aleksandr.o.makarov@gmail.com","sentAt":"2017-09-07T13:51:36Z","receivedAt":"2017-09-07T13:51:54Z","isPatch":true,"sender":{"key":"aleksandr.o.makarov@gmail.com","avatar":null},"body":"---\n  ref-filter.c | 2 +-\n  1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/ref-filter.c b/ref-filter.c\nindex bc591f4..3746628 100644\n--- a/ref-filter.c\n+++ b/ref-filter.c\n@@ -1663,7 +1663,7 @@ static int match_name_as_path(const struct ref_filter *filter, const char *refna\n  \t\t     refname[plen] == '/' ||\n  \t\t     p[plen-1] == '/'))\n  \t\t\treturn 1;\n-\t\tif (!wildmatch(p, refname, WM_PATHNAME))\n+\t\tif (!wildmatch(p, refname, flags))\n  \t\t\treturn 1;\n  \t}\n  \treturn 0;\n-- \n2.7.4\n\n"},{"id":"327711","messageId":"20170907145040.eazbv4qh6rg25gus@sigill.intra.peff.net","threadId":"46719","inReplyTo":"79c946a2-532e-1c9b-7bf2-1f1ccbff721e@gmail.com","subject":"Re: [PATCH] match_name_as_path: Pass WM_CASEFOLD to wildmatch","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2017-09-07T14:50:40Z","receivedAt":"2017-09-07T14:50:51Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Sep 07, 2017 at 04:51:36PM +0300, Aleksandr Makarov wrote:\n\n> ---\n\nYour commit message leaves me with a lot of questions. Let me see if I\ncan answer them. :)\n\nCan this code path be triggered? We need to set filter->ignore_case,\nbut also filter->match_as_patch. So \"git branch --ignore-case\" works,\nbut \"git for-each-ref --ignore-case\" is totally broken.\n\nWhen did this break? It looks like ignore-case never worked with\nfor-each-ref. This should have been part of Duy's (+cc) 3bb16a8bf2 (tag,\nbranch, for-each-ref: add --ignore-case for sorting and filtering,\n2016-12-04). It got the match_pattern() one right, but missed this tweak\nin match_as_path.\n\nHow come we didn't notice? Because 3bb16a8bf2 has tests for branch and\ntag, but not for-each-ref. We should probably add one as part of this\nfix.\n\nAnd finally, your patch needs a sign-off to be included in the project\n(see Documentation/SubmittingPatches).\n\n> diff --git a/ref-filter.c b/ref-filter.c\n> index bc591f4..3746628 100644\n> --- a/ref-filter.c\n> +++ b/ref-filter.c\n> @@ -1663,7 +1663,7 @@ static int match_name_as_path(const struct ref_filter *filter, const char *refna\n>  \t\t     refname[plen] == '/' ||\n>  \t\t     p[plen-1] == '/'))\n>  \t\t\treturn 1;\n> -\t\tif (!wildmatch(p, refname, WM_PATHNAME))\n> +\t\tif (!wildmatch(p, refname, flags))\n\nThe patch itself looks correct to me. Thanks.\n\n-Peff\n"}]}