1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-06-01 15:56:08 +02:00

Merge branch 'dl/subtree-avoid-tricky-echo'

"git subtree" script (in contrib/) used "echo -n" to produce
progress messages in a non-portable way.

* dl/subtree-avoid-tricky-echo:
  contrib/subtree: portability fix for string printing
This commit is contained in:
Junio C Hamano 2015-05-22 12:41:45 -07:00
commit b54301bdad

View File

@ -51,14 +51,21 @@ prefix=
debug()
{
if [ -n "$debug" ]; then
echo "$@" >&2
printf "%s\n" "$*" >&2
fi
}
say()
{
if [ -z "$quiet" ]; then
echo "$@" >&2
printf "%s\n" "$*" >&2
fi
}
progress()
{
if [ -z "$quiet" ]; then
printf "%s\r" "$*" >&2
fi
}
@ -599,7 +606,7 @@ cmd_split()
eval "$grl" |
while read rev parents; do
revcount=$(($revcount + 1))
say -n "$revcount/$revmax ($createcount) "
progress "$revcount/$revmax ($createcount)"
debug "Processing commit: $rev"
exists=$(cache_get $rev)
if [ -n "$exists" ]; then