{"thread":{"id":"33980","subject":"[PATCH] Makefile: promote wildmatch to be the default fnmatch implementation","startedAt":"2013-05-30T01:34:44Z","lastAt":"2013-05-30T11:37:08Z","messageCount":3,"participants":["Nguyễn Thái Ngọc Duy","Junio C Hamano","Duy Nguyen"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"218918","messageId":"1369877684-5050-1-git-send-email-pclouds@gmail.com","threadId":"33980","inReplyTo":null,"subject":"[PATCH] Makefile: promote wildmatch to be the default fnmatch implementation","fromName":"Nguyễn Thái Ngọc Duy","fromEmail":"pclouds@gmail.com","sentAt":"2013-05-30T01:34:44Z","receivedAt":"2013-05-30T01:34:44Z","isPatch":true,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"This makes git use wildmatch by default for all fnmatch() calls. Users\nwho want to use system fnmatch (or compat fnmatch) need to set\nNO_WILDMATCH flag.\n\nwildmatch is a drop-in fnmatch replacement with more features. Using\nwildmatch gives us a consistent behavior across platforms. The\ntentative plan is make it default with an opt-out for about 2 cycles,\nthen remove NO_WILDMATCH and compat/fnmatch.\n\nSigned-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>\n---\n Makefile | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex 0f931a2..efc8439 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -106,7 +106,7 @@ all::\n # Define NO_FNMATCH_CASEFOLD if your fnmatch function doesn't have the\n # FNM_CASEFOLD GNU extension.\n #\n-# Define USE_WILDMATCH if you want to use Git's wildmatch\n+# Define NO_WILDMATCH if you do not want to use Git's wildmatch\n # implementation as fnmatch\n #\n # Define NO_GECOS_IN_PWENT if you don't have pw_gecos in struct passwd\n@@ -1261,7 +1261,7 @@ ifdef NO_FNMATCH_CASEFOLD\n \tCOMPAT_OBJS += compat/fnmatch/fnmatch.o\n endif\n endif\n-ifdef USE_WILDMATCH\n+ifndef NO_WILDMATCH\n \tCOMPAT_CFLAGS += -DUSE_WILDMATCH\n endif\n ifdef NO_SETENV\n-- \n1.8.2.82.gc24b958\n"},{"id":"218920","messageId":"7vvc61p5jw.fsf@alter.siamese.dyndns.org","threadId":"33980","inReplyTo":"1369877684-5050-1-git-send-email-pclouds@gmail.com","subject":"Re: [PATCH] Makefile: promote wildmatch to be the default fnmatch implementation","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-05-30T02:25:39Z","receivedAt":"2013-05-30T02:25:39Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Nguyễn Thái Ngọc Duy  <pclouds@gmail.com> writes:\n\n> This makes git use wildmatch by default for all fnmatch() calls. Users\n> who want to use system fnmatch (or compat fnmatch) need to set\n> NO_WILDMATCH flag.\n>\n> wildmatch is a drop-in fnmatch replacement with more features. Using\n> wildmatch gives us a consistent behavior across platforms.\n\nHmph, could you (no need to hurry, though) check the previous\ndiscussion and point at what we decided if we did reach any\nconclusion to refresh our collective memory?\n\nWhile I agree this is a good move in the longer term in that we get\nthe often-asked-for \"foo/**/*.c\" match and also we have one less\nplatform differences to worry about, I somehow have a recollection\nthat we discussed that there are incompatibilities in dark corners\nwe would want to warn users about and lay a transition plan across\nsome major version bump.\n\nThanks.\n"},{"id":"218975","messageId":"CACsJy8Cz5z6adg1ZUP2Lf+WL1VdNdhLot+JhONUMwQaSHCeEyA@mail.gmail.com","threadId":"33980","inReplyTo":"7vvc61p5jw.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] Makefile: promote wildmatch to be the default fnmatch implementation","fromName":"Duy Nguyen","fromEmail":"pclouds@gmail.com","sentAt":"2013-05-30T11:37:08Z","receivedAt":"2013-05-30T11:37:08Z","isPatch":true,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On Thu, May 30, 2013 at 9:25 AM, Junio C Hamano <gitster@pobox.com> wrote:\n> Nguyễn Thái Ngọc Duy  <pclouds@gmail.com> writes:\n>\n>> This makes git use wildmatch by default for all fnmatch() calls. Users\n>> who want to use system fnmatch (or compat fnmatch) need to set\n>> NO_WILDMATCH flag.\n>>\n>> wildmatch is a drop-in fnmatch replacement with more features. Using\n>> wildmatch gives us a consistent behavior across platforms.\n>\n> While I agree this is a good move in the longer term in that we get\n> the often-asked-for \"foo/**/*.c\" match and also we have one less\n> platform differences to worry about, I somehow have a recollection\n> that we discussed that there are incompatibilities in dark corners\n> we would want to warn users about and lay a transition plan across\n> some major version bump.\n\nI've skimmed through all wildmatch related mails in my gmail archive.\nThere are differences between fnmatch versions, e.g. [1], but I don't\nthink anyone would run into those cases on purpose. There were\nperformance concerns [2] and they should have been addressed with\nnd/retire-fnmatch series. Originally I was worried that this new code\nmight not be mature enough, but I've been running wildmatch-only git\nfor quite some time, can't really complain.\n\nNot really a transition plan, but maybe we could provide a runtime\nswitch to return to system fnmatch when wildmatch becomes default, for\na few cycles. This way if wildmatch turns out broken, people can\nswitch back while we work on a fix.\n\n> Hmph, could you (no need to hurry, though) check the previous\n> discussion and point at what we decided if we did reach any\n> conclusion to refresh our collective memory?\n\nWe all seemed to agree that the replacement would be a way to go. But\nnot hard decision was reached.\n\n[1] http://thread.gmane.org/gmane.comp.version-control.git/207385/focus=207540\n[2] http://thread.gmane.org/gmane.comp.version-control.git/211823/focus=211836\n--\nDuy\n"}]}