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