summaryrefslogtreecommitdiff
path: root/contrib/subtree
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-08-01 18:52:43 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-08-01 18:52:43 (GMT)
commita5203a3f044ced7904800f3f233451474c1d5120 (patch)
tree13c6af9a3c8e9fdb2dcaf3b5345a5355e8caaa10 /contrib/subtree
parent400bf4c46b2bf01cca2658c7d7b4774d7a711486 (diff)
parent19c3c5fdcb35b66b792534c5dc4e8d87a3952d2a (diff)
downloadgit-a5203a3f044ced7904800f3f233451474c1d5120.zip
git-a5203a3f044ced7904800f3f233451474c1d5120.tar.gz
git-a5203a3f044ced7904800f3f233451474c1d5120.tar.bz2
Merge branch 'lf/echo-n-is-not-portable'
* lf/echo-n-is-not-portable: Avoid using `echo -n` anywhere
Diffstat (limited to 'contrib/subtree')
-rwxr-xr-xcontrib/subtree/git-subtree.sh2
-rwxr-xr-xcontrib/subtree/t/t7900-subtree.sh8
2 files changed, 5 insertions, 5 deletions
diff --git a/contrib/subtree/git-subtree.sh b/contrib/subtree/git-subtree.sh
index 51ae932..7d7af03 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"
}
diff --git a/contrib/subtree/t/t7900-subtree.sh b/contrib/subtree/t/t7900-subtree.sh
index b0f8536..66ce4b0 100755
--- a/contrib/subtree/t/t7900-subtree.sh
+++ b/contrib/subtree/t/t7900-subtree.sh
@@ -182,9 +182,9 @@ test_expect_success 'merge new subproj history into subdir' '
test_expect_success 'Check that prefix argument is required for split' '
echo "You must provide the --prefix option." > expected &&
test_must_fail git subtree split > actual 2>&1 &&
- test_debug "echo -n expected: " &&
+ test_debug "printf '"'"'expected: '"'"'" &&
test_debug "cat expected" &&
- test_debug "echo -n actual: " &&
+ test_debug "printf '"'"'actual: '"'"'" &&
test_debug "cat actual" &&
test_cmp expected actual &&
rm -f expected actual
@@ -193,9 +193,9 @@ test_expect_success 'Check that prefix argument is required for split' '
test_expect_success 'Check that the <prefix> exists for a split' '
echo "'"'"'non-existent-directory'"'"'" does not exist\; use "'"'"'git subtree add'"'"'" > expected &&
test_must_fail git subtree split --prefix=non-existent-directory > actual 2>&1 &&
- test_debug "echo -n expected: " &&
+ test_debug "printf '"'"'expected: '"'"'" &&
test_debug "cat expected" &&
- test_debug "echo -n actual: " &&
+ test_debug "printf '"'"'actual: '"'"'" &&
test_debug "cat actual" &&
test_cmp expected actual
# rm -f expected actual