[PATCH 4/4] contrib/subtree: Replace invisible carriage return with a visible \r

2013-03-13 Thread Paul Campbell
From: Matt Hoffman matt.hoff...@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 pcampb...@kemitix.net

Conflicts:
git-subtree.sh
---
 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

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 4/4] contrib/subtree: Replace invisible carriage return with a visible \r

2013-03-13 Thread Paul Campbell
On Wed, Mar 13, 2013 at 10:32 PM, Paul Campbell pcampb...@kemitix.net wrote:
 From: Matt Hoffman matt.hoff...@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 pcampb...@kemitix.net

 Conflicts:
 git-subtree.sh

Oops. Meant to replace this Conflict line.

 ---
  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




-- 
Paul [W] Campbell
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html