From: Jeff King Date: Wed, 29 Oct 2025 15:55:59 GMT Subject: Re: [PATCH] doc: document backslash in gitignore patterns Message-ID: <20251029155559.GA1134232@coredump.intra.peff.net> In-Reply-To: <20251029153237.GA1133542@coredump.intra.peff.net> On Wed, Oct 29, 2025 at 11:32:37AM -0400, Jeff King wrote: > Subject: [PATCH] doc: document backslash in gitignore patterns Oh, I forgot to mention: obviously gitattributes inherits the same behavior here. I looked at whether it would want a similar patch, but it does not define the pattern format at all, and just punts to "see gitignore(5) for details". I think that's OK. Unlike where we refer to fnmatch(3) here, you cannot even begin to wonder how backslashes are handled by gitattributes without reading gitignore(5). ;) There's also the "pathspec" entry in gitglossary(7), which does mention fnmatch(3). Though it is even more confusing because of the literal matching that pathspecs do. I don't know if we'd want anything there (and I kind of doubt people get as exotic about patterns there as they would in gitignore). -Peff