transport-helper: fix remote helper namespace regression
[gitweb.git] / t / t5801-remote-helpers.sh
index 0b13d106987422e10a039b1db926da7473811b9a..443e228ec5d34d293e1fdcf60ee4074c57e04549 100755 (executable)
@@ -167,6 +167,20 @@ test_expect_success 'push update refs' '
        )
 '
 
+test_expect_success 'push update refs failure' '
+       (cd local &&
+       git checkout update &&
+       echo "update fail" >>file &&
+       git commit -a -m "update fail" &&
+       git rev-parse --verify testgit/origin/heads/update >expect &&
+       GIT_REMOTE_TESTGIT_PUSH_ERROR="non-fast forward" &&
+       export GIT_REMOTE_TESTGIT_PUSH_ERROR &&
+       test_expect_code 1 git push origin update &&
+       git rev-parse --verify testgit/origin/heads/update >actual &&
+       test_cmp expect actual
+       )
+'
+
 test_expect_success 'proper failure checks for fetching' '
        (GIT_REMOTE_TESTGIT_FAILURE=1 &&
        export GIT_REMOTE_TESTGIT_FAILURE &&