commit-reach(paint_down_to_common): plug two memory leaks
[git.git] / t / t7524-commit-summary.sh
blob47b2f1dc22a5cb8dafac61a9811cdc262793d06e
1 #!/bin/sh
3 test_description='git commit summary'
4 . ./test-lib.sh
6 test_expect_success 'setup' '
7 test_seq 101 200 >file &&
8 git add file &&
9 git commit -m initial &&
10 git tag initial
13 test_expect_success 'commit summary ignores rewrites' '
14 git reset --hard initial &&
15 test_seq 200 300 >file &&
17 git diff --stat >diffstat &&
18 git diff --stat --break-rewrites >diffstatrewrite &&
20 # make sure this scenario is a detectable rewrite
21 ! test_cmp_bin diffstat diffstatrewrite &&
23 git add file &&
24 git commit -m second >actual &&
26 grep "1 file" <actual >actual.total &&
27 grep "1 file" <diffstat >diffstat.total &&
28 test_cmp diffstat.total actual.total
31 test_done