aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xt/t1400-update-ref.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/t/t1400-update-ref.sh b/t/t1400-update-ref.sh
index a2015d097..208f56e51 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 rev-parse --verify -q $a
+'
+
test_expect_success 'stdin -z fails update with no new value' '
printf $F "update $a" >stdin &&
test_must_fail git update-ref -z --stdin <stdin 2>err &&