3 # Copyright (c) 2005 Junio C Hamano
6 test_description
='More rename detection tests.
8 The rename detection logic should be able to detect pure rename or
9 copy of symbolic links, but should not produce rename/copy followed
13 .
"$TEST_DIRECTORY"/diff-lib.sh
15 if test "$no_symlinks"
17 say
'Symbolic links not supported, skipping tests.'
23 'prepare reference tree' \
24 'echo xyzzy | tr -d '\\\\'012 >yomin &&
26 git update-index --add frotz yomin &&
27 tree=$(git write-tree) &&
36 git update-index --add --remove frotz rezrov nitfol bozbar yomin'
38 # tree has frotz pointing at xyzzy, and yomin that contains xyzzy to
39 # confuse things. work tree has rezrov (xyzzy) nitfol (xyzzy) and
41 # rezrov and nitfol are rename/copy of frotz and bozbar should be
44 GIT_DIFF_OPTS
=--unified=0 git diff-index
-M -p $tree >current
46 diff --git a
/bozbar b
/bozbar
52 \ No newline
at end of
file
53 diff --git a
/frotz b
/nitfol
57 diff --git a
/frotz b
/rezrov
61 diff --git a
/yomin b
/yomin
62 deleted
file mode
100644
67 \ No newline
at end of
file
71 'validate diff output' \
72 'compare_diff_patch current expected'