summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: df5e91f)
raw | patch | inline | side by side (parent: df5e91f)
author | Brian Gernhardt <benji@silverinsanity.com> | |
Fri, 31 Oct 2008 05:09:13 +0000 (01:09 -0400) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 1 Nov 2008 04:38:48 +0000 (21:38 -0700) |
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>
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>
index ed12c4d78298dec9c5f1bf83f4f877b07d2659c0..9fa561047430ae40a1860131a024e4fd7744f5cb 100755 (executable)
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 \
index f195aefe3a207fa5bac447b59f16423da25abc21..1ed44ee503f9ecfb5222a9bce3f42ff2aa8127bc 100755 (executable)
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 \
index 1b0964843e85cc516356f4bc12c46eb32665abf2..3aed1bbdfed0f415a615f77c72210336d83f33ed 100755 (executable)
--- a/t/t4030-diff-textconv.sh
+++ b/t/t4030-diff-textconv.sh
EOF
# make a symlink the hard way that works on symlink-challenged file systems
test_expect_failure 'textconv does not act on symlinks' '
- echo -n frotz > file &&
+ printf frotz > file &&
git add file &&
git ls-files -s | sed -e s/100644/120000/ |
git update-index --index-info &&
index 53892a555ce2e4a51db15066771f217a135e15e9..433c4de08f0cc8d220d5368ab2ab0dffde372482 100755 (executable)
git commit -m initial &&
git branch b-symlink &&
git branch b-file &&
-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 &&
git commit -m master &&
git checkout b-symlink &&
-l=$(echo -n file-different | git hash-object -t blob -w --stdin) &&
+l=$(printf file-different | git hash-object -t blob -w --stdin) &&
echo "120000 $l symlink" | git update-index --index-info &&
git commit -m b-symlink &&
git checkout b-file &&
index c1850d29239f8846c42b4552493d2d4898fa221e..6a37f71d11800f92a117bfdcf38172bfc9000d77 100755 (executable)
test_expect_success 'cvs update (-p)' '
touch really-empty &&
echo Line 1 > no-lf &&
- echo -n Line 2 >> no-lf &&
+ printf "Line 2" >> no-lf &&
git add really-empty no-lf &&
git commit -q -m "Update -p test" &&
git push gitcvs.git >/dev/null &&