]>
Commit | Line | Data |
---|---|---|
84792322 RS |
1 | #!/bin/sh |
2 | ||
3 | test_description='git commit summary' | |
4 | . ./test-lib.sh | |
5 | ||
6 | test_expect_success 'setup' ' | |
7 | test_seq 101 200 >file && | |
8 | git add file && | |
9 | git commit -m initial && | |
10 | git tag initial | |
11 | ' | |
12 | ||
13 | test_expect_success 'commit summary ignores rewrites' ' | |
14 | git reset --hard initial && | |
15 | test_seq 200 300 >file && | |
16 | ||
17 | git diff --stat >diffstat && | |
18 | git diff --stat --break-rewrites >diffstatrewrite && | |
19 | ||
20 | # make sure this scenario is a detectable rewrite | |
21 | ! test_cmp_bin diffstat diffstatrewrite && | |
22 | ||
23 | git add file && | |
24 | git commit -m second >actual && | |
25 | ||
26 | grep "1 file" <actual >actual.total && | |
27 | grep "1 file" <diffstat >diffstat.total && | |
28 | test_cmp diffstat.total actual.total | |
29 | ' | |
30 | ||
31 | test_done |