From: Michael Haggerty Date: Mon, 7 Apr 2014 13:48:04 +0000 (+0200) Subject: t1400: test that stdin -z update treats empty as zeros X-Git-Tag: v2.1.0-rc0~200^2~14 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/191f241b528c10e242d045bde2cef70fb013a6e5?ds=inline;hp=-c t1400: test that stdin -z update treats empty as zeros This is the (slightly inconsistent) status quo; make sure it doesn't change by accident. Signed-off-by: Michael Haggerty Signed-off-by: Junio C Hamano --- 191f241b528c10e242d045bde2cef70fb013a6e5 diff --git a/t/t1400-update-ref.sh b/t/t1400-update-ref.sh index a2015d0977..208f56e518 100755 --- a/t/t1400-update-ref.sh +++ b/t/t1400-update-ref.sh @@ -730,6 +730,13 @@ test_expect_success 'stdin -z fails update with bad ref name' ' grep "fatal: invalid ref format: ~a" err ' +test_expect_success 'stdin -z treats empty new value as zeros' ' + git update-ref $a $m && + printf $F "update $a" "" "" >stdin && + git update-ref -z --stdin stdin && test_must_fail git update-ref -z --stdin err &&