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

Re: .gitattributes escape character?

From
Kevin Ballard <kevin@sb.org>
Date
Nov 3, 2010, 21:03 UTC
Message-ID
<F6E88AB2-D512-45A3-87FF-46F2C9ED0092@sb.org>
In-Reply-To
<AANLkTinNctmWpshBeSTzZRm6+EJ=Cjdpoaj4Aon+52_b@mail.gmail.com>
On Nov 3, 2010, at 8:47 AM, Nguyen Thai Ngoc Duy wrote:
Show 9 quoted lines
> On Wed, Nov 3, 2010 at 7:24 PM, Marc Strapetz <marc.strapetz@syntevo.com> wrote:
>> Is there an escape character which may be used in .gitattributes to
>> escape e.g. the space-character? Could octal-escaping help here (I
>> didn't succeed)? Thanks for any hints.
> 
> You mean escape the path part in .gitattributes? Sorry, no.
> 
> I think we can teach git about path quoting though. A leading double
> quote means the path is quoted, C-style.

I agree that gitattributes needs to learn about C-style quoting. However, in the meantime you can just replace a space with ? as it's actually a pattern. In other words, "test/file with spaces" can be represented as test/file?with?spaces

-Kevin Ballard
Previous: Marc StrapetzNext: Nguyễn Thái Ngọc Duy
Message 4 of 18 in “.gitattributes escape character?”
  1. Marc StrapetzNov 3, 2010
  2. Nguyen Thai Ngoc DuyNov 3, 2010
  3. Marc StrapetzNov 3, 2010
  4. Kevin BallardNov 3, 2010
  5. attr: support quoting pathname patterns in C styleNguyễn Thái Ngọc Duy, Nov 4, 2010
  6. Sverre RabbelierNov 4, 2010
  7. Eric SunshineNov 4, 2010
  8. Nguyen Thai Ngoc DuyNov 5, 2010
  9. Junio C HamanoNov 5, 2010
  10. Kevin BallardNov 5, 2010
  11. Junio C HamanoNov 8, 2010
  12. Kevin BallardNov 8, 2010
  13. Johannes SixtNov 9, 2010
  14. Kevin BallardNov 9, 2010
  15. Junio C HamanoNov 10, 2010
  16. Kevin BallardNov 10, 2010
  17. Marc StrapetzNov 6, 2010
  18. attr: support quoting pathname patterns in C styleNguyễn Thái Ngọc Duy, Nov 7, 2010

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.