3 # Copyright (c) 2005 Junio C Hamano
6 test_description
='More rename detection
10 .
"$TEST_DIRECTORY"/diff-lib.sh
;# test-lib chdir's into trash
13 'prepare reference tree' \
14 'cat "$TEST_DIRECTORY"/diff-lib/COPYING >COPYING &&
16 git update-index --add COPYING rezrov &&
17 tree=$(git write-tree) &&
22 'sed -e 's
/HOWEVER
/However
/' <COPYING >COPYING.1 &&
23 sed -e 's
/GPL
/G.P.L
/g
' <COPYING >COPYING.2 &&
25 git update-index --add --remove COPYING COPYING.?'
27 # tree has COPYING and rezrov. work tree has COPYING.1 and COPYING.2,
28 # both are slightly edited, and unchanged rezrov. So we say you
29 # copy-and-edit one, and rename-and-edit the other. We do not say
30 # anything about rezrov.
32 GIT_DIFF_OPTS
=--unified=0 git diff-index
-C -p $tree >current
34 diff --git a
/COPYING b
/COPYING
.1
40 - HOWEVER
, in order to allow a migration to GPLv3
if that seems like
41 + However
, in order to allow a migration to GPLv3
if that seems like
42 diff --git a
/COPYING b
/COPYING
.2
48 - Note that the only valid version of the GPL as far as this project
49 + Note that the only valid version of the G.P.L as far as this project
51 - HOWEVER
, in order to allow a migration to GPLv3
if that seems like
52 + HOWEVER
, in order to allow a migration to G.P.Lv3
if that seems like
54 - This
file is licensed under the GPL v2
, or a later version
55 + This
file is licensed under the G.P.L v2
, or a later version
59 'validate output from rename/copy detection (#1)' \
60 'compare_diff_patch current expected'
63 'prepare work tree again' \
64 'mv COPYING.2 COPYING &&
65 git update-index --add --remove COPYING COPYING.1 COPYING.2'
67 # tree has COPYING and rezrov. work tree has COPYING and COPYING.1,
68 # both are slightly edited, and unchanged rezrov. So we say you
69 # edited one, and copy-and-edit the other. We do not say
70 # anything about rezrov.
72 GIT_DIFF_OPTS
=--unified=0 git diff-index
-C -p $tree >current
74 diff --git a
/COPYING b
/COPYING
78 - Note that the only valid version of the GPL as far as this project
79 + Note that the only valid version of the G.P.L as far as this project
81 - HOWEVER
, in order to allow a migration to GPLv3
if that seems like
82 + HOWEVER
, in order to allow a migration to G.P.Lv3
if that seems like
84 - This
file is licensed under the GPL v2
, or a later version
85 + This
file is licensed under the G.P.L v2
, or a later version
86 diff --git a
/COPYING b
/COPYING
.1
92 - HOWEVER
, in order to allow a migration to GPLv3
if that seems like
93 + However
, in order to allow a migration to GPLv3
if that seems like
97 'validate output from rename/copy detection (#2)' \
98 'compare_diff_patch current expected'
100 test_expect_success \
101 'prepare work tree once again' \
102 'cat "$TEST_DIRECTORY"/diff-lib/COPYING >COPYING &&
103 git update-index --add --remove COPYING COPYING.1'
105 # tree has COPYING and rezrov. work tree has COPYING and COPYING.1,
106 # but COPYING is not edited. We say you copy-and-edit COPYING.1; this
107 # is only possible because -C mode now reports the unmodified file to
108 # the diff-core. Unchanged rezrov, although being fed to
109 # git diff-index as well, should not be mentioned.
111 GIT_DIFF_OPTS
=--unified=0 \
112 git diff-index
-C --find-copies-harder -p $tree >current
114 diff --git a
/COPYING b
/COPYING
.1
120 - HOWEVER
, in order to allow a migration to GPLv3
if that seems like
121 + However
, in order to allow a migration to GPLv3
if that seems like
124 test_expect_success \
125 'validate output from rename/copy detection (#3)' \
126 'compare_diff_patch current expected'