Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/git/blob/master/t/t4009-diff-rename-4.sh # git [Ported from github.com/git/git] Sync with Git 2.56.1 Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `git / t / t4009-diff-rename-4.sh` 99 lines ยท 2679 bytes Raw Blame History 1 #!/bin/sh 2 # 3 # Copyright (c) 2005 Junio C Hamano 4 # 5 6 test_description='Same rename detection as t4003 but testing diff-raw -z. 7 8 ' 9 10 . ./test-lib.sh 11 . "$TEST_DIRECTORY"/lib-diff.sh ;# test-lib chdir's into trash 12 13 test_expect_success \ 14 'prepare reference tree' \ 15 'COPYING_test_data >COPYING && 16 echo frotz >rezrov && 17 git update-index --add COPYING rezrov && 18 orig=$(git hash-object COPYING) && 19 tree=$(git write-tree) && 20 echo $tree' 21 22 test_expect_success \ 23 'prepare work tree' \ 24 'sed -e 's/HOWEVER/However/' COPYING.1 && 25 sed -e 's/GPL/G.P.L/g' COPYING.2 && 26 rm -f COPYING && 27 c1=$(git hash-object COPYING.1) && 28 c2=$(git hash-object COPYING.2) && 29 git update-index --add --remove COPYING COPYING.?' 30 31 # tree has COPYING and rezrov. work tree has COPYING.1 and COPYING.2, 32 # both are slightly edited, and unchanged rezrov. We say COPYING.1 33 # and COPYING.2 are based on COPYING, and do not say anything about 34 # rezrov. 35 36 git diff-index -z -C $tree >current 37 38 cat >expected <current 64 cat >expected <COPYING && 86 git update-index --add --remove COPYING COPYING.1' 87 88 git diff-index -z -C --find-copies-harder $tree >current 89 cat >expected <