t7501: add test of "commit --dry-run --short"

Add test for commit with --dry-run --short for a new file of zero length. The test demonstrates that the setting of the committable flag is broken. Signed-off-by: Stephen P. Smith <ischis2@cox.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Stephen P. Smith committed Sep 5, 2018 at 17:53 UTC 8282f59f90b8d864f245dd04a79106b9e620e137
1 file changed +6
t/t7501-commit.sh
+6
@@ -682,4 +682,10 @@ test_expect_success '--dry-run with conflicts fixed from a merge' '
682 git commit -m "conflicts fixed from merge."
683 '
684
685 +test_expect_failure '--dry-run --short' '
686 + >test-file &&
687 + git add test-file &&
688 + git commit --dry-run --short
689 +'
690 +
691 test_done