git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 2/2] diff: document the pattern format for diff.orderFile

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 11, 2017, 18:15 UTC
Message-ID
<xmqqwpe1o43k.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<21b416ae-8bf6-4f82-25d3-e51a574e7746@google.com>
Richard Hansen <hansenr@google.com> writes:
Show 13 quoted lines
> 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.

I'd expect that orderfile people have today will be broken and require tweaking if you switched WM_PATHNAME on.

Previous: Richard HansenNext: Richard Hansen
Message 16 of 24 in “minor diff orderfile documentation improvements”
  1. 0/2 minor diff orderfile documentation improvementsRichard Hansen, Jan 10, 2017
  2. 1/2 diff: document behavior of relative diff.orderFileRichard Hansen, Jan 10, 2017
  3. Jeff KingJan 10, 2017
  4. Richard HansenJan 10, 2017
  5. Junio C HamanoJan 10, 2017
  6. Junio C HamanoJan 10, 2017
  7. Richard HansenJan 10, 2017
  8. Junio C HamanoJan 10, 2017
  9. Jeff KingJan 11, 2017
  10. Junio C HamanoJan 11, 2017
  11. 2/2 diff: document the pattern format for diff.orderFileRichard Hansen, Jan 10, 2017
  12. Junio C HamanoJan 10, 2017
  13. Richard HansenJan 11, 2017
  14. Junio C HamanoJan 11, 2017
  15. Richard HansenJan 11, 2017
  16. Junio C HamanoJan 11, 2017
  17. Richard HansenJan 11, 2017
  18. Junio C HamanoJan 11, 2017
  19. 0/2 diff orderfile documentation improvementsRichard Hansen, Jan 11, 2017
  20. 1/2 diff: document behavior of relative diff.orderFileRichard Hansen, Jan 11, 2017
  21. 2/2 diff: document the format of the -O (diff.orderFile) fileRichard Hansen, Jan 11, 2017
  22. 0/2 diff orderfile documentation improvementsRichard Hansen, Jan 15, 2017
  23. 1/2 diff: document behavior of relative diff.orderFileRichard Hansen, Jan 15, 2017
  24. 2/2 diff: document the format of the -O (diff.orderFile) fileRichard Hansen, Jan 15, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.