summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e23eff8)
raw | patch | inline | side by side (parent: e23eff8)
author | Jason Riedy <ejr@EECS.Berkeley.EDU> | |
Tue, 6 Dec 2005 22:21:52 +0000 (14:21 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Wed, 7 Dec 2005 02:09:12 +0000 (18:09 -0800) |
On AIX, there is no -n option to the system's echo. Instead,
it needs the '\c' control character. We could replace
echo -n "foo"
with
echo -e "foo\c"
but printf is recommended by most man pages. Tested on AIX
5.3, Solaris 8, and Debian.
[jc: futureproofed two instances that uses variable with '%s'
so later feeding different messages would not break things too
easily; others are emitting literal so whoever changes the
literal ought to notice more easily so they are safe.]
Signed-off-by: E. Jason Riedy <ejr@cs.berkeley.edu>
Signed-off-by: Junio C Hamano <junkio@cox.net>
it needs the '\c' control character. We could replace
echo -n "foo"
with
echo -e "foo\c"
but printf is recommended by most man pages. Tested on AIX
5.3, Solaris 8, and Debian.
[jc: futureproofed two instances that uses variable with '%s'
so later feeding different messages would not break things too
easily; others are emitting literal so whoever changes the
literal ought to notice more easily so they are safe.]
Signed-off-by: E. Jason Riedy <ejr@cs.berkeley.edu>
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-am.sh | patch | blob | history | |
git-applypatch.sh | patch | blob | history | |
git-bisect.sh | patch | blob | history | |
git-status.sh | patch | blob | history |
diff --git a/git-am.sh b/git-am.sh
index 660b3a4b6113f58ff33fd2db2cdeac25ce32f95d..6ed527c7a9c2d0bb9bbf84b2176b86ffc0670c93 100755 (executable)
--- a/git-am.sh
+++ b/git-am.sh
echo "--------------------------"
cat "$dotest/final-commit"
echo "--------------------------"
- echo -n "Apply? [y]es/[n]o/[e]dit/[v]iew patch/[a]ccept all "
+ printf "Apply? [y]es/[n]o/[e]dit/[v]iew patch/[a]ccept all "
read reply
case "$reply" in
[yY]*) action=yes ;;
diff --git a/git-applypatch.sh b/git-applypatch.sh
index 4c577eb835b877dd0766edbc5a603ee4e3db049a..a112e1a50405c733e9e94c610caf36a7b07297dd 100755 (executable)
--- a/git-applypatch.sh
+++ b/git-applypatch.sh
echo "--------------------------"
cat "$final"
echo "--------------------------"
- echo -n "Apply? [y]es/[n]o/[e]dit/[a]ccept all "
+ printf "Apply? [y]es/[n]o/[e]dit/[a]ccept all "
read reply
case "$reply" in
y|Y) interactive=no;;
diff --git a/git-bisect.sh b/git-bisect.sh
index 68838f3fad1d22ab4f14977434e9ce73365fb304..05dae8ad13fc7b3a0aa694d038e12845146a0a27 100755 (executable)
--- a/git-bisect.sh
+++ b/git-bisect.sh
rm -rf "$GIT_DIR/refs/bisect/"
mkdir "$GIT_DIR/refs/bisect"
{
- echo -n "git-bisect start"
+ printf "git-bisect start"
sq "$@"
} >"$GIT_DIR/BISECT_LOG"
sq "$@" >"$GIT_DIR/BISECT_NAMES"
diff --git a/git-status.sh b/git-status.sh
index b90ffc198d97bccfc7f484e8555b01ba9bf5217b..2dda0c505cf41c9dbd9fc6db75f3c0550f6ee82f 100755 (executable)
--- a/git-status.sh
+++ b/git-status.sh
trailer=""
while read status name newname
do
- echo -n "$header"
+ printf '%s' "$header"
header=""
trailer="#
"
U ) echo "# unmerged: $name";;
esac
done
- echo -n "$trailer"
+ printf '%s' "$trailer"
[ "$header" ]
}