Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelipe Contreras <felipe.contreras@gmail.com>2013-05-10 16:08:30 +0400
committerJunio C Hamano <gitster@pobox.com>2013-05-11 00:28:31 +0400
commit126aac5cf3b5696481aafe840f8f596653087d8b (patch)
tree94e1cd9c4e582b32557f6121a12158e5e859f2de /t/t5801-remote-helpers.sh
parentd6ae7b2d366da8d90aa90cabfd54d285c24b5a86 (diff)
transport-helper: fix remote helper namespace regression
Commit 664059f (transport-helper: update remote helper namespace) updates the namespace when the push succeeds or not; we should do it only when it succeeded. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5801-remote-helpers.sh')
-rwxr-xr-xt/t5801-remote-helpers.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/t/t5801-remote-helpers.sh b/t/t5801-remote-helpers.sh
index 0b13d10698..443e228ec5 100755
--- a/t/t5801-remote-helpers.sh
+++ b/t/t5801-remote-helpers.sh
@@ -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 &&