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

Re: [PATCH v2] Support "\" in non-wildcard exclusion entries

From
Finn Arne Gangstad <finnag@pvv.org>
Date
Feb 10, 2009, 14:37 UTC
Message-ID
<20090210143742.GB16478@pvv.org>
In-Reply-To
<alpine.DEB.1.00.0902101525380.10279@pacific.mpi-cbg.de>
On Tue, Feb 10, 2009 at 03:27:43PM +0100, Johannes Schindelin wrote:
Show 7 quoted lines
> > +
> > +. ./test-lib.sh
> > +
> > +touch \#ignore1 &&
> 
> In other tests, we avoid 'touch' (IIRC it is not available everywhere or 
> some such), and we write ': > \#ignore1' instead.
Will fix it up after seeing if there are some other comments.
> 
> BTW we do not need the # in the name, it could be any letter, right?  
> (Just for my understanding, not as a request to change it.)

So far I have only had to use \ in exclusion rules starting with #, since they would otherwise be interpreted as comments, but it could be any character that \ would not change the meaning of. I am not sure what fnmatch would do with \t, \r and \n for example.

> > +cat >.gitignore <<EOF
> 
> You probably want to use \EOF here.
I am curious, does it matter? Most of the tests use EOF and not \EOF.
- Finn Arne
Previous: Johannes SchindelinNext: Junio C Hamano
Message 7 of 13 in “Support \ in non-wildcard .gitignore entries”
  1. Support \ in non-wildcard .gitignore entriesFinn Arne Gangstad, Feb 10, 2009
  2. Johannes SchindelinFeb 10, 2009
  3. Finn Arne GangstadFeb 10, 2009
  4. Johannes SchindelinFeb 10, 2009
  5. Support "\" in non-wildcard exclusion entriesFinn Arne Gangstad, Feb 10, 2009
  6. Johannes SchindelinFeb 10, 2009
  7. Finn Arne GangstadFeb 10, 2009
  8. Junio C HamanoFeb 10, 2009
  9. Junio C HamanoFeb 10, 2009
  10. Finn Arne GangstadFeb 10, 2009
  11. Support "\" in non-wildcard exclusion entriesFinn Arne Gangstad, Feb 12, 2009
  12. Johannes SchindelinFeb 12, 2009
  13. Junio C HamanoFeb 12, 2009

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.