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

Re: [BUG] gitignore documentation inconsistent with actual behaviour

From
Duy Nguyen <pclouds@gmail.com>
Date
Oct 20, 2018, 06:03 UTC
Message-ID
<CACsJy8CMSQZ7guGAyDqU_xdJrt7BiEDwdtePdfmgagnvSb2p=Q@mail.gmail.com>
In-Reply-To
<AFFFEB92-0CFE-45BA-8BE3-105E8963A121@dana.is>
On Sat, Oct 20, 2018 at 7:53 AM dana <dana@dana.is> wrote:
Show 7 quoted lines
>
> On 20 Oct 2018, at 00:26, Duy Nguyen <pclouds@gmail.com> wrote:
> >Which way should we go? I'm leaning towards the second one...
>
> Not sure how much my opinion is worth, but the second option does feel more
> friendly (from a usage perspective) as well as more straight-forward (from a
> re-implementation perspective).

Yeah. And not having to describe all the corner cases is a plus. Too many corner cases are a sign of bad implementation anyway. I'll wait some more time for the others to speak up before I cook a proper patch.

Show 6 quoted lines
> There's a third option too, though, right? The 'rsync' behaviour mentioned
> earlier? It wouldn't matter either way in any of the examples i listed, but is
> there ever a conceivable use case for something like `foo**bar`, where the `**`
> matches across slashes? (I can't think of any reason i'd need that personally,
> but then again i don't understand why these people are using `**` the way they
> are in the first place.)

foo**bar would match foobar as well as foo/bar, foo/x/bar and foo/x/y/bar... Its behavior is error prone in my opinion. There's also some concerns in early iterations of this "**" support that we would need to revisit if we want 'rsync' behavior. I'm not very excited about doing that.

-- 
Duy
Previous: danaNext: dana
Message 10 of 17 in “[BUG] gitignore documentation inconsistent with actual behaviour”
  1. danaOct 11, 2018
  2. danaOct 11, 2018
  3. Ævar Arnfjörð BjarmasonOct 11, 2018
  4. danaOct 14, 2018
  5. Duy NguyenOct 14, 2018
  6. Junio C HamanoOct 14, 2018
  7. Duy NguyenOct 15, 2018
  8. Duy NguyenOct 20, 2018
  9. danaOct 20, 2018
  10. Duy NguyenOct 20, 2018
  11. danaOct 20, 2018
  12. wildmatch: change behavior of "foo**bar" in WM_PATHNAME modeNguyễn Thái Ngọc Duy, Oct 27, 2018
  13. Torsten BögershausenOct 28, 2018
  14. Duy NguyenOct 28, 2018
  15. Junio C HamanoOct 29, 2018
  16. Ævar Arnfjörð BjarmasonOct 29, 2018
  17. Duy NguyenOct 29, 2018

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.