3 test_description
='git commit summary'
5 TEST_PASSES_SANITIZE_LEAK
=true
8 test_expect_success
'setup' '
9 test_seq 101 200 >file &&
11 git commit -m initial &&
15 test_expect_success
'commit summary ignores rewrites' '
16 git reset --hard initial &&
17 test_seq 200 300 >file &&
19 git diff --stat >diffstat &&
20 git diff --stat --break-rewrites >diffstatrewrite &&
22 # make sure this scenario is a detectable rewrite
23 ! test_cmp_bin diffstat diffstatrewrite &&
26 git commit -m second >actual &&
28 grep "1 file" <actual >actual.total &&
29 grep "1 file" <diffstat >diffstat.total &&
30 test_cmp diffstat.total actual.total