diff options
author | Lukas Fleischer <git@cryptocrack.de> | 2013-07-27 14:11:33 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-07-29 18:56:58 +0200 |
commit | 19c3c5fdcb35b66b792534c5dc4e8d87a3952d2a (patch) | |
tree | 9f1b20ea56120234b08824a7795e3fdc8ee4927f /contrib/subtree/git-subtree.sh | |
parent | Merge branch 'maint-1.8.1' into maint-1.8.2 (diff) | |
download | git-19c3c5fdcb35b66b792534c5dc4e8d87a3952d2a.tar.xz git-19c3c5fdcb35b66b792534c5dc4e8d87a3952d2a.zip |
Avoid using `echo -n` anywhere
`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 'contrib/subtree/git-subtree.sh')
-rwxr-xr-x | contrib/subtree/git-subtree.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/subtree/git-subtree.sh b/contrib/subtree/git-subtree.sh index 8a23f58ba0..2b217675af 100755 --- a/contrib/subtree/git-subtree.sh +++ b/contrib/subtree/git-subtree.sh @@ -311,7 +311,7 @@ copy_commit() GIT_COMMITTER_NAME \ GIT_COMMITTER_EMAIL \ GIT_COMMITTER_DATE - (echo -n "$annotate"; cat ) | + (printf "%s" "$annotate"; cat ) | git commit-tree "$2" $3 # reads the rest of stdin ) || die "Can't copy commit $1" } |