Re: [PATCH] fix portability issues with $ in double quotes

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

 



Stephen Boyd schrieb:
> Using a dollar sign in double quotes isn't portable. Escape them with
> a backslash or replace the double quotes with single quotes.

The instances you changed look good. I didn't check whether you missed
some. Was this some sort of mechanical change?

I must say that a backslash in front of a $ in a sed expression looks very
distracting:

> +	git cat-file commit HEAD | sed -e "1,/^\$/d" >actual &&
> +	git cat-file commit side@{1} | sed -e "1,/^\$/d" >expect &&

because it is easy to miss that the backslash is taken by the
double-quotes. But since these cases happen in the test suite where the
whole thing is in single-quotes already, I don't think we can do something
about it without making it even more unreadable...

-- Hannes

--
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]