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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Finn Arne Gangstad <finnag@xxxxxxx> 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.

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux