_empty=$(git hash-object --stdin <xyzzy) &&
>yomin &&
>caskly &&
- ln -s frotz nitfol &&
+ if test_have_prereq SYMLINKS; then
+ ln -s frotz nitfol &&
+ T_letter=T
+ else
+ printf %s frotz > nitfol &&
+ T_letter=M
+ fi &&
mkdir rezrov &&
>rezrov/bozbar &&
git add caskly xyzzy yomin nitfol rezrov/bozbar &&
>nitfol &&
# rezrov/bozbar disappears
rm -fr rezrov &&
- ln -s xyzzy rezrov &&
+ if test_have_prereq SYMLINKS; then
+ ln -s xyzzy rezrov
+ else
+ printf %s xyzzy > rezrov
+ fi &&
# xyzzy disappears (not a submodule)
mkdir xyzzy &&
echo gnusto >xyzzy/bozbar &&
s/blob/000000/
}
/ nitfol/{
- s/ nitfol/ $_z40 T&/
+ s/ nitfol/ $_z40 $T_letter&/
s/blob/100644/
}
/ rezrov.bozbar/{
test_expect_success diff-files '
git diff-files --raw >actual &&
- diff -u expect-files actual
+ test_cmp expect-files actual
'
test_expect_success diff-index '
git diff-index --raw HEAD -- >actual &&
- diff -u expect-index actual
+ test_cmp expect-index actual
'
test_expect_success 'add -u' '
cp -p ".git/index" ".git/saved-index" &&
git add -u &&
git ls-files -s >actual &&
- diff -u expect-final actual
+ test_cmp expect-final actual
'
test_expect_success 'commit -a' '
fi &&
git commit -m "second" -a &&
git ls-files -s >actual &&
- diff -u expect-final actual &&
+ test_cmp expect-final actual &&
rm -f .git/index &&
git read-tree HEAD &&
git ls-files -s >actual &&
- diff -u expect-final actual
+ test_cmp expect-final actual
'
test_done