aboutsummaryrefslogtreecommitdiff
path: root/t/t2102-update-index-symlinks.sh
diff options
context:
space:
mode:
authorBrian Gernhardt <benji@silverinsanity.com>2008-10-31 01:09:13 -0400
committerJunio C Hamano <gitster@pobox.com>2008-10-31 21:38:48 -0700
commit6ecfd91df5ec462aeded967c9ad21912c249f96e (patch)
treefaa7135734d9905f6cb430abe9561b5f771c0250 /t/t2102-update-index-symlinks.sh
parentdf5e91fc2c95e051744ec9b9de66869d2b323037 (diff)
downloadgit-6ecfd91df5ec462aeded967c9ad21912c249f96e.tar.gz
git-6ecfd91df5ec462aeded967c9ad21912c249f96e.tar.xz
Avoid using non-portable `echo -n` in tests.
Expecting echo to recognise -n is a BSDism. Using printf is far more portable. Discovered on OS X 10.5.5 in t4030-diff-textconv.sh and changed in all the test scripts. Signed-off-by: Brian Gernhardt <benji@silverinsanity.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t2102-update-index-symlinks.sh')
-rwxr-xr-xt/t2102-update-index-symlinks.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/t/t2102-update-index-symlinks.sh b/t/t2102-update-index-symlinks.sh
index f195aefe3..1ed44ee50 100755
--- a/t/t2102-update-index-symlinks.sh
+++ b/t/t2102-update-index-symlinks.sh
@@ -13,12 +13,12 @@ even if a plain file is in the working tree if core.symlinks is false.'
test_expect_success \
'preparation' '
git config core.symlinks false &&
-l=$(echo -n file | git hash-object -t blob -w --stdin) &&
+l=$(printf file | git hash-object -t blob -w --stdin) &&
echo "120000 $l symlink" | git update-index --index-info'
test_expect_success \
'modify the symbolic link' '
-echo -n new-file > symlink &&
+printf new-file > symlink &&
git update-index symlink'
test_expect_success \