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

Bug(ish) - Documentation of .gitattributes Globbing Syntax Whitespace Escapes

From
DTdis trans <humanoidanalog@gmail.com>
Date
Jan 20, 2016, 20:35 UTC
Message-ID
<CAN1fZZGqERtA1FqSH1sxi4T74TB4sex7kBPBM8J4fVimQO1eSA@mail.gmail.com>

In the documentation for .gitattributes, "[[:space:]]" is mentioned in a code snippet but is not documented, and neither is the glob syntax escape from the documentation page for .gitignore ("\ ") not working with .gitattributes.

For example, in a .gitattributes file the first glob will work, but the second will not.

my[[:space:]]directory/**/* my\ directory/**/*

The opposite is true with .gitignore.

I got caught up for a number of minutes trying to figure out why my escapes weren't working in the fancy-pants .gitattributes I whipped up, and I'd figured it'd be worth saving someone else the trouble. It could very well be documented somewhere I'm not aware of beside the code snippet, but I wasn't able to find it seldom a github issues search, so I think it'd be worth putting on the .gitattributes page.

PS -- Apologies for not having a diff to send to fix this, but I don't currently have the tools available to me.

Message 1 of 1 in “Bug(ish) - Documentation of .gitattributes Globbing Syntax Whitespace Escapes”
  1. dis transJan 20, 2016

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.