git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Sixt <j.sixt@viscovery.net>
To: Stephen Boyd <bebarino@gmail.com>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH] fix portability issues with $ in double quotes
Date: Wed, 27 Jan 2010 08:53:42 +0100	[thread overview]
Message-ID: <4B5FF106.3070604@viscovery.net> (raw)
In-Reply-To: <1264547311-25251-1-git-send-email-bebarino@gmail.com>

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

  reply	other threads:[~2010-01-27  7:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-26 23:08 [PATCH] fix portability issues with $ in double quotes Stephen Boyd
2010-01-27  7:53 ` Johannes Sixt [this message]
2010-01-27 18:47   ` Stephen Boyd
2010-01-27 19:16     ` 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=4B5FF106.3070604@viscovery.net \
    --to=j.sixt@viscovery.net \
    --cc=bebarino@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).