summaryrefslogtreecommitdiff
path: root/contrib/subtree/git-subtree.sh
diff options
context:
space:
mode:
authorLukas Fleischer <git@cryptocrack.de>2013-07-27 12:11:33 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-07-29 16:56:58 (GMT)
commit19c3c5fdcb35b66b792534c5dc4e8d87a3952d2a (patch)
tree9f1b20ea56120234b08824a7795e3fdc8ee4927f /contrib/subtree/git-subtree.sh
parentf59bebb78edb26e4f66c2754bc4d168c5d4ebb4a (diff)
downloadgit-19c3c5fdcb35b66b792534c5dc4e8d87a3952d2a.zip
git-19c3c5fdcb35b66b792534c5dc4e8d87a3952d2a.tar.gz
git-19c3c5fdcb35b66b792534c5dc4e8d87a3952d2a.tar.bz2
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-xcontrib/subtree/git-subtree.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/subtree/git-subtree.sh b/contrib/subtree/git-subtree.sh
index 8a23f58..2b21767 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"
}