]>
git.ipfire.org Git - thirdparty/git.git/blob - t/t4066-diff-emit-delay.sh
3 test_description
='test combined/stat/moved interaction'
6 # This test covers a weird 3-way interaction between "--cc -p", which will run
7 # the combined diff code, along with "--stat", which will be computed as a
8 # first-parent stat during the combined diff, and "--color-moved", which
9 # enables the emitted_symbols list to store the diff in memory.
11 test_expect_success
'set up history with a merge' '
14 git checkout -b side HEAD^ &&
16 git merge -m M master &&
20 test_expect_success
'log --cc -p --stat --color-moved' '
21 cat >expect <<-\EOF &&
25 1 file changed, 1 insertion(+)
27 diff --git a/D.t b/D.t
29 index 0000000..1784810
37 1 file changed, 1 insertion(+)
41 1 file changed, 1 insertion(+)
43 diff --git a/C.t b/C.t
45 index 0000000..3cc58df
53 1 file changed, 1 insertion(+)
55 diff --git a/B.t b/B.t
57 index 0000000..223b783
65 1 file changed, 1 insertion(+)
67 diff --git a/A.t b/A.t
69 index 0000000..f70f10e
75 git log --format="commit %s" --cc -p --stat --color-moved >actual &&
76 test_cmp expect actual