public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox•com>
To: Finn Arne Gangstad <finnag@pvv•org>
Cc: Johannes Schindelin <Johannes.Schindelin@gmx•de>, git@vger•kernel.org
Subject: Re: [PATCH v2] Support "\" in non-wildcard exclusion entries
Date: Tue, 10 Feb 2009 07:24:44 -0800	[thread overview]
Message-ID: <7vab8upb5v.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <20090210143742.GB16478@pvv.org> (Finn Arne Gangstad's message of "Tue, 10 Feb 2009 15:37:42 +0100")

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.

  reply	other threads:[~2009-02-10 15:26 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-10 12:11 [PATCH] Support \ in non-wildcard .gitignore entries Finn Arne Gangstad
2009-02-10 12:56 ` Johannes Schindelin
2009-02-10 12:58   ` Finn Arne Gangstad
2009-02-10 13:02     ` Johannes Schindelin
2009-02-10 14:20       ` [PATCH v2] Support "\" in non-wildcard exclusion entries Finn Arne Gangstad
2009-02-10 14:27         ` Johannes Schindelin
2009-02-10 14:37           ` Finn Arne Gangstad
2009-02-10 15:24             ` Junio C Hamano [this message]
2009-02-10 16:41               ` Junio C Hamano
2009-02-10 17:23                 ` Finn Arne Gangstad
2009-02-12  9:32                 ` [PATCH v3] " Finn Arne Gangstad
2009-02-12 10:44                   ` Johannes Schindelin
2009-02-12 21:03                     ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vab8upb5v.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox$(echo .)com \
    --cc=Johannes.Schindelin@gmx$(echo .)de \
    --cc=finnag@pvv$(echo .)org \
    --cc=git@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox