Git development
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 2/3] Add a test for git-rerere
Date: Thu, 21 Dec 2006 00:41:53 -0800	[thread overview]
Message-ID: <7vhcvpej3i.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <Pine.LNX.4.63.0612210927150.19693@wbgn013.biozentrum.uni-wuerzburg.de> (Johannes Schindelin's message of "Thu, 21 Dec 2006 09:34:07 +0100 (CET)")

Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:

>> > +rm $rr/postimage
>> > +echo -ne "$sha1\ta1\0" > .git/rr-cache/MERGE_RR
>> 
>> Hmmmmmm.  I've stayed away from "echo -e" so far...
>
> Rather do it with tr? Like this:
>
> 	echo -n "$sha1	a1X" | tr X '\0' > .git/rr-cache/MERGE_RR

Bog-standard old timer's way is not to use -n nor X but just do:

	echo "stuff you want to NUL terminate" | tr '\012' '\0'

> Is $((1+2)) portable enough? I always thought this is a bashism...

That's also in ksh and dash (and in POSIX) and recent updates to
out *.sh scripts make liberal use of them.  As long as you do
not overflow you are fine.

  reply	other threads:[~2006-12-21  8:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-20 16:37 [PATCH 2/3] Add a test for git-rerere Johannes Schindelin
2006-12-20 18:37 ` Junio C Hamano
2006-12-21  8:34   ` Johannes Schindelin
2006-12-21  8:41     ` Junio C Hamano [this message]
2006-12-21  9:21       ` [PATCH] " Johannes Schindelin

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=7vhcvpej3i.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    /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