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

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

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 10, 2009, 16:41 UTC
Message-ID
<7v7i3ynt1z.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<7vab8upb5v.fsf@gitster.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
Show 20 quoted lines
> Finn Arne Gangstad <finnag@pvv.org> writes:
>
>>> > +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.
>
> If you want the same shell variable expansion and quoting rules as you get
> inside double-quote pair, you would say <<EOF without any quotes.  If you
> quote the EOF, no such substitutions happen.
>
> In this particular case, you want what you typed there literally in the
> file, so <<\EOF would be more correct, even though \# expands to \#
> itself.
>
> IOW, your current list of patterns does not happen to have anything like
> $var nor \\ that would make a difference, but to protect future breakages
> by people adding more patterns there, it is better to say <<\EOF when you
> know you are not asking for any funny expansion to be explicit.

Oh, by the way, do we really want to add a new test script? I am wondering why the test is not an update to an existing test for the exclusion feature, such as t/t3001-ls-files-others-exclude.sh

Previous: Junio C HamanoNext: Finn Arne Gangstad
Message 9 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.