Merge branch 'jh/note-trees-record-blobs'
[gitweb.git] / t / t5801-remote-helpers.sh
index 16faa23154a7711ac7408d4a6df64e1623c28bcb..613f69a254bab23e1f09126b4a7f3dca8692deaa 100755 (executable)
@@ -8,11 +8,6 @@ test_description='Test remote-helper import and export commands'
 . ./test-lib.sh
 . "$TEST_DIRECTORY"/lib-gpg.sh
 
-if ! type "${BASH-bash}" >/dev/null 2>&1; then
-       skip_all='skipping remote-testgit tests, bash not available'
-       test_done
-fi
-
 compare_refs() {
        git --git-dir="$1/.git" rev-parse --verify $2 >expect &&
        git --git-dir="$3/.git" rev-parse --verify $4 >actual &&
@@ -187,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 &&
@@ -215,9 +221,7 @@ 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 2> error &&
-       cat error &&
-       grep -q "Reading from helper .git-remote-testgit. failed" error
+       test_must_fail git push --all
        )
 '