git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Brandon Casey <casey@nrlssc.navy.mil>
To: benji@silverinsanity.com
Cc: avarab@gmail.com, Matthieu.Moy@imag.fr, gitster@pobox.com,
	git@vger.kernel.org, Brandon Casey <drafnel@gmail.com>
Subject: [PATCH 2/2] git-rebase--interactive.sh: use printf instead of echo to print commit message
Date: Fri, 13 Aug 2010 15:47:35 -0500	[thread overview]
Message-ID: <vFgTzGXLhalxcMpLoOFhqi1W6sU5I3lJ9CWjrrJjoRmkMjHSswmpLXU2vVL8PS5JJNEO727l9q8@cipher.nrlssc.navy.mil> (raw)
In-Reply-To: <D1A252AE-5D4C-4E51-9359-F4A443BB8A2E@silverinsanity.com>

From: Brandon Casey <drafnel@gmail.com>

Replace the echo statements that operate on $rest with printf's to restore
what was lost from 938791cd.  This avoids any mangling that XSI-conformant
echo's may introduce.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
---


Junio,

Feel free to squash this into 1/2 if desired.

-Brandon


 git-rebase--interactive.sh |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index 2e5bed0..3419247 100755
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -625,7 +625,7 @@ skip_unnecessary_picks () {
 		case "$fd,$command" in
 		3,pick|3,p)
 			# pick a commit whose parent is current $ONTO -> skip
-			sha1=$(echo "$rest" | cut -d ' ' -f 1)
+			sha1=$(printf '%s' "$rest" | cut -d ' ' -f 1)
 			case "$(git rev-parse --verify --quiet "$sha1"^)" in
 			"$ONTO"*)
 				ONTO=$sha1
@@ -642,7 +642,7 @@ skip_unnecessary_picks () {
 			fd=1
 			;;
 		esac
-		echo "$command${rest:+ }$rest" >&$fd
+		printf '%s\n' "$command${rest:+ }$rest" >&$fd
 	done <"$TODO" >"$TODO.new" 3>>"$DONE" &&
 	mv -f "$TODO".new "$TODO" &&
 	case "$(peek_next_command)" in
-- 
1.7.2.1

  parent reply	other threads:[~2010-08-13 20:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-13 16:37 git rebase -i exec merger broke t3404-rebase-interactive.sh Ævar Arnfjörð Bjarmason
2010-08-13 17:20 ` Brian Gernhardt
2010-08-13 20:47   ` [PATCH 1/2] git-rebase--interactive.sh: rework skip_unnecessary_picks Brandon Casey
2010-08-13 20:47   ` Brandon Casey [this message]
2010-08-13 21:34     ` [PATCH 2/2] git-rebase--interactive.sh: use printf instead of echo to print commit message Brian Gernhardt
2010-08-15  8:56       ` Matthieu Moy
2010-08-22  7:22     ` 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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=vFgTzGXLhalxcMpLoOFhqi1W6sU5I3lJ9CWjrrJjoRmkMjHSswmpLXU2vVL8PS5JJNEO727l9q8@cipher.nrlssc.navy.mil \
    --to=casey@nrlssc.navy.mil \
    --cc=Matthieu.Moy@imag.fr \
    --cc=avarab@gmail.com \
    --cc=benji@silverinsanity.com \
    --cc=drafnel@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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).