From: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
To: konglu@minatec.inpg.fr
Cc: "Torsten Bögershausen" <tboegi@web.de>,
"Lucien Kong" <Lucien.Kong@ensimag.imag.fr>,
git@vger.kernel.org
Subject: Re: rebase [-i --exec | -ix] <CMD>...
Date: Thu, 07 Jun 2012 22:49:23 +0200 [thread overview]
Message-ID: <vpqboku3l0s.fsf@bauges.imag.fr> (raw)
In-Reply-To: <20120607215512.Horde.RVmScHwdC4BP0QcggMBjKUA@webmail.minatec.grenoble-inp.fr> (konglu@minatec.inpg.fr's message of "Thu, 07 Jun 2012 21:55:12 +0200")
konglu@minatec.inpg.fr writes:
> As you pointed out, the problem seems to come from this line
> tmp=$(sed "/^pick .*/i\exec $i" "$1")
> I think that the dquote here doesn't work on MacOS, though i've
> never tried it.
I don't see a reason why it wouldn't. Anyway, quotes are managed by the
shell, and in our case, sed is the one complaining.
I experimented a bit, and it seems Mac OS's sed insists in having a \
and a newline after i (it seems POSIX requires it too). In your code
above, the \ is included in double quotes, so you have to escape it.
This snippet works reliably on my Linux machine and on a Mac OS X one:
x=$(echo 'pick foo' | sed -e "/pick/i\\
exec $1")
echo "$x"
> Anyway, even if it's not the problem, this kind of quoting is quite
> odd so it will be removed in the next patch
Be careful, you do need quoting around $i.
--
Matthieu Moy
http://www-verimag.imag.fr/~moy/
next prev parent reply other threads:[~2012-06-07 20:49 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-07 11:53 commit a63d7ed3017e312ddc752ac89a7d292a745d5f11 broken on MacOS Torsten Bögershausen
2012-06-07 14:20 ` konglu
2012-06-07 16:14 ` Torsten Bögershausen
2012-06-07 16:40 ` konglu
2012-06-07 16:46 ` rebase [-i --exec | -ix] <CMD> Lucien Kong
2012-06-07 17:57 ` Torsten Bögershausen
2012-06-07 18:07 ` konglu
2012-06-07 19:10 ` Torsten Bögershausen
2012-06-07 19:55 ` konglu
2012-06-07 20:35 ` Andreas Schwab
2012-06-07 20:44 ` konglu
2012-06-07 21:12 ` Andreas Schwab
2012-06-07 20:49 ` Matthieu Moy [this message]
2012-06-07 20:59 ` Johannes Sixt
2012-06-08 15:34 ` 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=vpqboku3l0s.fsf@bauges.imag.fr \
--to=matthieu.moy@grenoble-inp.fr \
--cc=Lucien.Kong@ensimag.imag.fr \
--cc=git@vger.kernel.org \
--cc=konglu@minatec.inpg.fr \
--cc=tboegi@web.de \
/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).