All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Campbell <pcampbell@kemitix.net>
To: git <git@vger.kernel.org>
Cc: David Greene <greened@obbligato.org>,
	Matt Hoffman <matt.hoffman@quantumretail.com>,
	Paul Campbell <pcampbell@kemitix.net>
Subject: [PATCH] contrib/subtree: Replace invisible carriage return with a visible \r
Date: Wed, 13 Mar 2013 22:42:34 +0000	[thread overview]
Message-ID: <1363214554-4490-1-git-send-email-pcampbell@kemitix.net> (raw)
In-Reply-To: <CALeLG_kSye2xRoUJ8ytjx-bsj6oSG_brPbj-X3yfXuLA-KEppA@mail.gmail.com>

From: Matt Hoffman <matt.hoffman@quantumretail.com>

The ctrl-M (^M) character used for the carriage return (CR) is not visible
in all (most) text editors and is often silently converted to a new
line (NL) or CR/NL combo.

'say' is a wrapper for echo with accepts the option -e to interperet
escaped characters. \r becomes a CR, yet is not munged by text
editors.

Signed-off-by: Paul Campbell <pcampbell@kemitix.net>
---

Rerolled with the Conflicts lines removed.

 contrib/subtree/git-subtree.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/contrib/subtree/git-subtree.sh b/contrib/subtree/git-subtree.sh
index 2d9b071..5314bd0 100755
--- a/contrib/subtree/git-subtree.sh
+++ b/contrib/subtree/git-subtree.sh
@@ -595,7 +595,7 @@ cmd_split()
 	eval "$grl" |
 	while read rev parents; do
 		revcount=$(($revcount + 1))
-		say -n "$revcount/$revmax ($createcount)
"
+		say -ne "$revcount/$revmax ($createcount)\r"
 		debug "Processing commit: $rev"
 		exists=$(cache_get $rev)
 		if [ -n "$exists" ]; then
-- 
1.8.2

  reply	other threads:[~2013-03-13 22:43 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-13 22:32 [PATCH 0/4] contrib/subtree: general updates Paul Campbell
2013-03-13 22:32 ` [PATCH 1/4] contrib/subtree: Teach push to abort if split fails Paul Campbell
2013-03-13 22:32 ` [PATCH 2/4] contrib/subtree: Teach push to use --force option Paul Campbell
2013-03-13 22:32 ` [PATCH 3/4] contrib/subtree: Fix typo (s/incldued/included/) Paul Campbell
2013-03-13 22:32 ` [PATCH 4/4] contrib/subtree: Replace invisible carriage return with a visible \r Paul Campbell
2013-03-13 22:36   ` Paul Campbell
2013-03-13 22:42     ` Paul Campbell [this message]
2013-03-14  2:52 ` [PATCH 0/4] contrib/subtree: general updates Miles Bader
2013-03-14  3:30   ` Junio C Hamano
2013-03-24  0:16     ` Paul Campbell

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=1363214554-4490-1-git-send-email-pcampbell@kemitix.net \
    --to=pcampbell@kemitix.net \
    --cc=git@vger.kernel.org \
    --cc=greened@obbligato.org \
    --cc=matt.hoffman@quantumretail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.