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/t4037-diff-r-t-dirs.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 / t4037-diff-r-t-dirs.sh` 53 lines ยท 658 bytes Raw Blame History 1 #!/bin/sh 2 3 test_description='diff -r -t shows directory additions and deletions' 4 5 . ./test-lib.sh 6 7 test_expect_success setup ' 8 mkdir dc dr dt && 9 >dc/1 && 10 >dr/2 && 11 >dt/3 && 12 >fc && 13 >fr && 14 >ft && 15 git add . && 16 test_tick && 17 git commit -m initial && 18 19 rm -fr dt dr ft fr && 20 mkdir da ft && 21 for p in dc/1 da/4 dt ft/5 fc 22 do 23 echo hello >$p || exit 24 done && 25 git add -u && 26 git add . && 27 test_tick && 28 git commit -m second 29 ' 30 31 cat >expect <<\EOF 32 A da 33 A da/4 34 M dc 35 M dc/1 36 D dr 37 D dr/2 38 A dt 39 D dt 40 D dt/3 41 M fc 42 D fr 43 D ft 44 A ft 45 A ft/5 46 EOF 47 48 test_expect_success verify ' 49 git diff-tree -r -t --name-status HEAD^ HEAD >actual && 50 test_cmp expect actual 51 ' 52 53 test_done