From: Richard Hansen <hansenr@google.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 2/2] diff: document the pattern format for diff.orderFile
Date: Wed, 11 Jan 2017 13:36:41 -0500 [thread overview]
Message-ID: <2fb4296d-f084-4a76-44f3-7dc7d7cca7b1@google.com> (raw)
In-Reply-To: <xmqqwpe1o43k.fsf@gitster.mtv.corp.google.com>
On 2017-01-11 13:15, Junio C Hamano wrote:
> Richard Hansen <hansenr@google.com> writes:
>
>> On 2017-01-10 21:46, Junio C Hamano wrote:
>>> Richard Hansen <hansenr@google.com> writes:
>>>
>>>> I was looking at the code to see how the two file formats differed and
>>>> noticed that match_order() doesn't set the WM_PATHNAME flag when it
>>>> calls wildmatch(). That's unintentional (a bug), right?
>>>
>>> It has been that way from day one IIRC even before we introduced
>>> wildmatch()---IOW it may be intentional that the current code that
>>> uses wildmatch() does not use WM_PATHNAME.
>>
>> You are the original author (af5323e027 2005-05-30). Do you remember
>> what your intention was?
>
> Yes.
>
> Back then we didn't even have wildmatch(), and used fnmatch()
> instead, so forcing FNM_PATHNAME would have meant that people
> wouldn't be able to say "foo*bar" to match "foo/other/bar"; with
> wildmatch, "foo**bar" lets you defeat WM_PATHNAME so having
> WM_PATHNAME always in effect is less of an issue, but with
> fnmatch(), having FNM_PATHNAME always in effect has a lot of
> downside.
Ah, that makes sense.
>
> I'd expect that orderfile people have today will be broken and
> require tweaking if you switched WM_PATHNAME on.
OK, so we don't want to turn on WM_PATHNAME unless we do it for a new
major version.
I'll do another re-roll and document the non-WM_PATHNAME behavior.
Perhaps I'll encourage users to prefer ** over * if they want to match
slash (even though they are equivalent) so that migration is easier if
we ever do turn on WM_PATHNAME.
-Richard
next prev parent reply other threads:[~2017-01-11 18:36 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-10 0:40 [PATCH 0/2] minor diff orderfile documentation improvements Richard Hansen
2017-01-10 0:40 ` [PATCH 1/2] diff: document behavior of relative diff.orderFile Richard Hansen
2017-01-10 6:58 ` Jeff King
2017-01-10 17:27 ` Richard Hansen
2017-01-10 20:19 ` Junio C Hamano
2017-01-10 20:23 ` Junio C Hamano
2017-01-10 22:01 ` Richard Hansen
2017-01-10 22:15 ` Junio C Hamano
2017-01-11 14:41 ` Jeff King
2017-01-11 20:53 ` Junio C Hamano
2017-01-10 0:40 ` [PATCH 2/2] diff: document the pattern format for diff.orderFile Richard Hansen
2017-01-10 20:14 ` Junio C Hamano
2017-01-11 1:14 ` Richard Hansen
2017-01-11 2:46 ` Junio C Hamano
2017-01-11 17:24 ` Richard Hansen
2017-01-11 18:15 ` Junio C Hamano
2017-01-11 18:36 ` Richard Hansen [this message]
2017-01-11 21:06 ` Junio C Hamano
2017-01-11 1:57 ` [PATCH v2 0/2] diff orderfile documentation improvements Richard Hansen
2017-01-11 1:57 ` [PATCH v2 1/2] diff: document behavior of relative diff.orderFile Richard Hansen
2017-01-11 1:57 ` [PATCH v2 2/2] diff: document the format of the -O (diff.orderFile) file Richard Hansen
2017-01-15 22:16 ` [PATCH v3 0/2] diff orderfile documentation improvements Richard Hansen
2017-01-15 22:16 ` [PATCH v3 1/2] diff: document behavior of relative diff.orderFile Richard Hansen
2017-01-15 22:16 ` [PATCH v3 2/2] diff: document the format of the -O (diff.orderFile) file Richard Hansen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2fb4296d-f084-4a76-44f3-7dc7d7cca7b1@google.com \
--to=hansenr@google.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).