summaryrefslogtreecommitdiff
path: root/t/perf
diff options
context:
space:
mode:
authorLukas Fleischer <git@cryptocrack.de>2013-07-27 14:11:33 +0200
committerJunio C Hamano <gitster@pobox.com>2013-07-29 09:56:58 -0700
commit19c3c5fdcb35b66b792534c5dc4e8d87a3952d2a (patch)
tree9f1b20ea56120234b08824a7795e3fdc8ee4927f /t/perf
parentf59bebb78edb26e4f66c2754bc4d168c5d4ebb4a (diff)
downloadgit-19c3c5fdcb35b66b792534c5dc4e8d87a3952d2a.tar.gz
Avoid using `echo -n` anywherelf/echo-n-is-not-portable
`echo -n` is non-portable. The POSIX specification says: Conforming applications that wish to do prompting without <newline> characters or that could possibly be expecting to echo a -n, should use the printf utility derived from the Ninth Edition system. Since all of the affected shell scripts use a POSIX shell shebang, replace `echo -n` invocations with printf. Signed-off-by: Lukas Fleischer <git@cryptocrack.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/perf')
-rw-r--r--t/perf/perf-lib.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/t/perf/perf-lib.sh b/t/perf/perf-lib.sh
index a816fbcb76..eab66d7c9b 100644
--- a/t/perf/perf-lib.sh
+++ b/t/perf/perf-lib.sh
@@ -160,7 +160,7 @@ test_perf () {
echo "$test_count" >>"$perf_results_dir"/$base.subtests
echo "$1" >"$perf_results_dir"/$base.$test_count.descr
if test -z "$verbose"; then
- echo -n "perf $test_count - $1:"
+ printf "%s" "perf $test_count - $1:"
else
echo "perf $test_count - $1:"
fi
@@ -169,7 +169,7 @@ test_perf () {
if test_run_perf_ "$2"
then
if test -z "$verbose"; then
- echo -n " $i"
+ printf " %s" "$i"
else
echo "* timing run $i/$GIT_PERF_REPEAT_COUNT:"
fi