Add test for commit with --dry-run --short for a new file of zero
length.

The test demonstrates that the setting of the commitable flag is
broken.

Signed-off-by: Stephen P. Smith <isch...@cox.net>
---
 t/t7501-commit.sh | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/t/t7501-commit.sh b/t/t7501-commit.sh
index 4cae92804..5812dc2f8 100755
--- a/t/t7501-commit.sh
+++ b/t/t7501-commit.sh
@@ -682,4 +682,12 @@ test_expect_success '--dry-run with conflicts fixed from a 
merge' '
        git commit -m "conflicts fixed from merge."
 '
 
+test_expect_failure '--dry-run --short' '
+       # setup two branches with conflicting information
+       # in the same file, resolve the conflict
+       >test-file &&
+       git add test-file &&
+       git commit --dry-run --short
+'
+
 test_done
-- 
2.18.0

Reply via email to