test_expect_success \
'diff new symlink' \
'ln -s xyzzy frotz &&
- git-update-index &&
- tree=$(git-write-tree) &&
- git-update-index --add frotz &&
- GIT_DIFF_OPTS=--unified=0 git-diff-index -M -p $tree > current &&
+ git update-index &&
+ tree=$(git write-tree) &&
+ git update-index --add frotz &&
+ GIT_DIFF_OPTS=--unified=0 git diff-index -M -p $tree > current &&
compare_diff_patch current expected'
test_expect_success \
'diff unchanged symlink' \
- 'tree=$(git-write-tree) &&
- git-update-index frotz &&
- test -z "$(git-diff-index --name-only $tree)"'
+ 'tree=$(git write-tree) &&
+ git update-index frotz &&
+ test -z "$(git diff-index --name-only $tree)"'
cat > expected << EOF
diff --git a/frotz b/frotz
test_expect_success \
'diff removed symlink' \
'rm frotz &&
- git-diff-index -M -p $tree > current &&
+ git diff-index -M -p $tree > current &&
compare_diff_patch current expected'
cat > expected << EOF
'diff identical, but newly created symlink' \
'sleep 3 &&
ln -s xyzzy frotz &&
- git-diff-index -M -p $tree > current &&
+ git diff-index -M -p $tree > current &&
compare_diff_patch current expected'
cat > expected << EOF
'diff different symlink' \
'rm frotz &&
ln -s yxyyz frotz &&
- git-diff-index -M -p $tree > current &&
+ git diff-index -M -p $tree > current &&
compare_diff_patch current expected'
test_done