This test is trying to test a few ways to delete references using "git
update-ref -z --stdin".  The third line passed in is

    update SP /refs/heads/c NUL NUL <sha1> NUL

, which is not a correct way to delete a reference according to the
documentation (the new value should be zeros, not empty).  Pass zeros
instead as the new value to test the code correctly.

Signed-off-by: Michael Haggerty <>
 t/ | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/ b/t/
index 29391c6..e2f1dfa 100755
--- a/t/
+++ b/t/
@@ -927,7 +927,7 @@ test_expect_success 'stdin -z update refs fails with wrong 
old value' '
 test_expect_success 'stdin -z delete refs works with packed and loose refs' '
        git pack-refs --all &&
        git update-ref $c $m~1 &&
-       printf $F "delete $a" "$m" "update $b" "$Z" "$m" "update $c" "" "$m~1" 
>stdin &&
+       printf $F "delete $a" "$m" "update $b" "$Z" "$m" "update $c" "$Z" 
"$m~1" >stdin &&
        git update-ref -z --stdin <stdin &&
        test_must_fail git rev-parse --verify -q $a &&
        test_must_fail git rev-parse --verify -q $b &&

To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to
More majordomo info at

Reply via email to