Re: [PATCH next v2] git-notes: add test case for multi-line notes
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jan 14, 2009, 18:01 UTC
- Message-ID
- <alpine.DEB.1.00.0901141900490.3586@pacific.mpi-cbg.de>
- In-Reply-To
- <496E1D77.6000307@viscovery.net>
Hi,
On Wed, 14 Jan 2009, Johannes Sixt wrote:
Show 24 quoted lines
> Jeff King schrieb:
> > On Wed, Jan 14, 2009 at 05:28:11PM +0100, Tor Arne Vestbø wrote:
> >
> >> +MSG=${MSG//%/}
> >> +printf "$MSG" > "$1"
> >> +printf "$MSG" >& 2
> >
> > Substitution parameter expansion is a bash-ism, IIRC. How about just
> >
> > printf %s "$MSG" ?
>
> A the point was that $MSG contains \n, which should be turned int LF. IMO,
> the easiest way to achieve this is:
>
> MSG='b3
> c3c3c3c3
> d3d3d3'
>
> test_expect_success ' ... ' '
> ...
> MSG="$MSG" git notes edit
> '
>
> and go back to using echo in the part cited above.Heh, I almost suggested it, but I know that I get quoting wrong all the time.
Ciao, Dscho