3 # Copyright (c) 2005 Johannes Schindelin
6 test_description
='Test diff of symlinks.
12 if test "$no_symlinks"
14 say
'Symbolic links not supported, skipping tests.'
20 diff --git a/frotz b/frotz
22 index 0000000..7c465af
27 \ No newline at end of file
34 tree=$(git write-tree) &&
35 git update-index --add frotz &&
36 GIT_DIFF_OPTS=--unified=0 git diff-index -M -p $tree > current &&
37 compare_diff_patch current expected'
40 'diff unchanged symlink' \
41 'tree=$(git write-tree) &&
42 git update-index frotz &&
43 test -z "$(git diff-index --name-only $tree)"'
46 diff --git a/frotz b/frotz
47 deleted file mode 120000
48 index 7c465af..0000000
53 \ No newline at end of file
57 'diff removed symlink' \
59 git diff-index -M -p $tree > current &&
60 compare_diff_patch current expected'
63 diff --git a/frotz b/frotz
67 'diff identical, but newly created symlink' \
70 git diff-index -M -p $tree > current &&
71 compare_diff_patch current expected'
74 diff --git a/frotz b/frotz
75 index 7c465af..df1db54 120000
80 \ No newline at end of file
82 \ No newline at end of file
86 'diff different symlink' \
89 git diff-index -M -p $tree > current &&
90 compare_diff_patch current expected'