| # Copyright (c) 2011, Google Inc. |
| test_description='diff --stat-count' |
| TEST_PASSES_SANITIZE_LEAK=true |
| test_expect_success 'setup' ' |
| test_expect_success 'mode-only change show as a 0-line change' ' |
| 4 files changed, 2 insertions(+) |
| git diff --stat --stat-count=2 HEAD >actual && |
| test_expect_success 'binary changes do not count in lines' ' |
| cat "$TEST_DIRECTORY"/test-binary-1.png >d && |
| 3 files changed, 2 insertions(+) |
| git diff --stat --stat-count=2 >actual && |
| test_expect_success 'exclude unmerged entries from total file count' ' |
| sed -e "s/ 0 a/ $stage d/" x || return 1 |
| git update-index --index-info && |
| 3 files changed, 3 insertions(+) |
| git diff --stat --stat-count=2 >actual && |