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