transport-helper: clarify pushing without refspecs
[gitweb.git] / t / t5801-remote-helpers.sh
index 0b376e0229fd5705043cf833fc314418f8fc2e4b..f95003a97eae75c51afcb69036ce212a5817854d 100755 (executable)
@@ -111,13 +111,13 @@ test_expect_success 'pulling without refspecs' '
        compare_refs local2 HEAD server HEAD
 '
 
-test_expect_failure 'pushing without refspecs' '
+test_expect_success 'pushing without refspecs' '
        test_when_finished "(cd local2 && git reset --hard origin)" &&
        (cd local2 &&
        echo content >>file &&
        git commit -a -m ten &&
-       GIT_REMOTE_TESTGIT_REFSPEC="" git push) &&
-       compare_refs local2 HEAD server HEAD
+       GIT_REMOTE_TESTGIT_REFSPEC="" test_must_fail git push 2>../error) &&
+       grep "remote-helper doesn.t support push; refspec needed" error
 '
 
 test_expect_success 'pulling without marks' '