3 test_description='test combined/stat/moved interaction'
4 GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main
5 export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
9 # This test covers a weird 3-way interaction between "--cc -p", which will run
10 # the combined diff code, along with "--stat", which will be computed as a
11 # first-parent stat during the combined diff, and "--color-moved", which
12 # enables the emitted_symbols list to store the diff in memory.
14 test_expect_success 'set up history with a merge' '
17 git checkout -b side HEAD^ &&
19 git merge -m M main &&
23 test_expect_success 'log --cc -p --stat --color-moved' '
28 1 file changed, 1 insertion(+)
30 diff --git a/D.t b/D.t
32 index 0000000..$(git rev-parse --short D:D.t)
40 1 file changed, 1 insertion(+)
44 1 file changed, 1 insertion(+)
46 diff --git a/C.t b/C.t
48 index 0000000..$(git rev-parse --short C:C.t)
56 1 file changed, 1 insertion(+)
58 diff --git a/B.t b/B.t
60 index 0000000..$(git rev-parse --short B:B.t)
68 1 file changed, 1 insertion(+)
70 diff --git a/A.t b/A.t
72 index 0000000..$(git rev-parse --short A:A.t)
78 git log --format="commit %s" --cc -p --stat --color-moved >actual &&
79 test_cmp expect actual