Code

git svn: handle SVN merges from revisions past the tip of the branch
[git.git] / t / t4022-diff-rewrite.sh
1 #!/bin/sh
3 test_description='rewrite diff'
5 . ./test-lib.sh
7 test_expect_success setup '
9         cat "$TEST_DIRECTORY"/../COPYING >test &&
10         git add test &&
11         tr \
12           "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" \
13           "nopqrstuvwxyzabcdefghijklmNOPQRSTUVWXYZABCDEFGHIJKLM" \
14           <"$TEST_DIRECTORY"/../COPYING >test
16 '
18 test_expect_success 'detect rewrite' '
20         actual=$(git diff-files -B --summary test) &&
21         expr "$actual" : " rewrite test ([0-9]*%)$" || {
22                 echo "Eh? <<$actual>>"
23                 false
24         }
26 '
28 test_done