mingw: do not crash on open(NULL, ...)
[git/mjg.git] / t / t4037-diff-r-t-dirs.sh
blobf5ce3b29a2ac753470b51bb494ca3836ffc21b11
1 #!/bin/sh
3 test_description='diff -r -t shows directory additions and deletions'
5 . ./test-lib.sh
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 &&
19 rm -fr dt dr ft fr &&
20 mkdir da ft &&
21 for p in dc/1 da/4 dt ft/5 fc
23 echo hello >$p || exit
24 done &&
25 git add -u &&
26 git add . &&
27 test_tick &&
28 git commit -m second
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
48 test_expect_success verify '
49 git diff-tree -r -t --name-status HEAD^ HEAD >actual &&
50 test_cmp expect actual
53 test_done