diff options
author | Danny Lin <danny0838@gmail.com> | 2015-05-08 08:56:59 +0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-05-08 12:09:38 -0700 |
commit | 2ded109b51878fb0bc131945676c90f1d1051213 (patch) | |
tree | d4edcd771a31b45c20f1c1956a2f74b5a7e46519 /userdiff.h | |
parent | Git 2.3.7 (diff) | |
download | tgif-2ded109b51878fb0bc131945676c90f1d1051213.tar.xz |
contrib/subtree: portability fix for string printing
'echo -n' is not portable, but this script used it as a way to give
a string followed by a carriage return for progress messages.
Introduce a new helper shell function "progress" and use printf as a
more portable way to do this. As a side effect, this makes it
unnecessary to have a raw CR in our source, which can be munged in
some shells. For example, MsysGit trims CR before executing a shell
script file in order to make it work right on Windows even if it
uses CRLF as linefeeds.
While at it, replace "echo" using printf in debug() and say() to
eliminate the temptation of reintroducing the same bug.
Signed-off-by: Danny Lin <danny0838@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'userdiff.h')
0 files changed, 0 insertions, 0 deletions