summaryrefslogtreecommitdiff
path: root/t/t5533-push-cas.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-04-26 06:39:05 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-04-26 06:39:05 (GMT)
commit46bdfa3975665aaa9b7383466b529354d117e14d (patch)
tree9d66e8981225e6d9cbd65ecfd8b52d9e389af0c1 /t/t5533-push-cas.sh
parentfa86d5cebe4151b642f66d932b842814e984c70e (diff)
parentf17d642d3b0fa64879d59b311e596949f2a1f6d2 (diff)
downloadgit-46bdfa3975665aaa9b7383466b529354d117e14d.zip
git-46bdfa3975665aaa9b7383466b529354d117e14d.tar.gz
git-46bdfa3975665aaa9b7383466b529354d117e14d.tar.bz2
Merge branch 'ab/push-cas-doc-n-test'
Doc update. * ab/push-cas-doc-n-test: push: document & test --force-with-lease with multiple remotes
Diffstat (limited to 't/t5533-push-cas.sh')
-rwxr-xr-xt/t5533-push-cas.sh29
1 files changed, 29 insertions, 0 deletions
diff --git a/t/t5533-push-cas.sh b/t/t5533-push-cas.sh
index a2c9e74..d38ecee 100755
--- a/t/t5533-push-cas.sh
+++ b/t/t5533-push-cas.sh
@@ -229,4 +229,33 @@ test_expect_success 'new branch already exists' '
)
'
+test_expect_success 'background updates of REMOTE can be mitigated with a non-updated REMOTE-push' '
+ rm -rf src dst &&
+ git init --bare src.bare &&
+ test_when_finished "rm -rf src.bare" &&
+ git clone --no-local src.bare dst &&
+ test_when_finished "rm -rf dst" &&
+ (
+ cd dst &&
+ test_commit G &&
+ git remote add origin-push ../src.bare &&
+ git push origin-push master:master
+ ) &&
+ git clone --no-local src.bare dst2 &&
+ test_when_finished "rm -rf dst2" &&
+ (
+ cd dst2 &&
+ test_commit H &&
+ git push
+ ) &&
+ (
+ cd dst &&
+ test_commit I &&
+ git fetch origin &&
+ test_must_fail git push --force-with-lease origin-push &&
+ git fetch origin-push &&
+ git push --force-with-lease origin-push
+ )
+'
+
test_done