t/Makefile: stop setting GIT_CONFIG
[gitweb.git] / t / t5801-remote-helpers.sh
index 8c4c5396a8447fc39d6f0c697af761631b08b3f7..ca1983827007738e5c8b0dec4a02f13631aaa75b 100755 (executable)
@@ -182,6 +182,17 @@ test_expect_success 'push update refs' '
        )
 '
 
+test_expect_success 'push update refs disabled by no-private-update' '
+       (cd local &&
+       echo more-update >>file &&
+       git commit -a -m more-update &&
+       git rev-parse --verify testgit/origin/heads/update >expect &&
+       GIT_REMOTE_TESTGIT_NO_PRIVATE_UPDATE=t git push origin update &&
+       git rev-parse --verify testgit/origin/heads/update >actual &&
+       test_cmp expect actual
+       )
+'
+
 test_expect_success 'push update refs failure' '
        (cd local &&
        git checkout update &&
@@ -207,10 +218,8 @@ test_expect_success 'proper failure checks for fetching' '
 '
 
 test_expect_success 'proper failure checks for pushing' '
-       (GIT_REMOTE_TESTGIT_FAILURE=1 &&
-       export GIT_REMOTE_TESTGIT_FAILURE &&
-       cd local &&
-       test_must_fail git push --all
+       (cd local &&
+       test_must_fail env GIT_REMOTE_TESTGIT_FAILURE=1 git push --all
        )
 '