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>
This commit is contained in:
Stephen P. Smith 2018-09-05 17:53:28 -07:00 committed by Junio C Hamano
parent 6fa9019494
commit 8282f59f90

View File

@ -682,4 +682,10 @@ test_expect_success '--dry-run with conflicts fixed from a merge' '
git commit -m "conflicts fixed from merge."
'
test_expect_failure '--dry-run --short' '
>test-file &&
git add test-file &&
git commit --dry-run --short
'
test_done