Sync with 'maint'
[alt-git.git] / t / t7524-commit-summary.sh
bloba8fceb6a47c3487099b8df3378e7fb3ac085c54c
1 #!/bin/sh
3 test_description='git commit summary'
5 TEST_PASSES_SANITIZE_LEAK=true
6 . ./test-lib.sh
8 test_expect_success 'setup' '
9 test_seq 101 200 >file &&
10 git add file &&
11 git commit -m initial &&
12 git tag 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 &&
25 git add file &&
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
33 test_done