summaryrefslogtreecommitdiff
path: root/t/t5541-http-push-smart.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t5541-http-push-smart.sh')
-rwxr-xr-xt/t5541-http-push-smart.sh12
1 files changed, 10 insertions, 2 deletions
diff --git a/t/t5541-http-push-smart.sh b/t/t5541-http-push-smart.sh
index 23be8ce92d..afc680d5e3 100755
--- a/t/t5541-http-push-smart.sh
+++ b/t/t5541-http-push-smart.sh
@@ -177,6 +177,9 @@ test_expect_success 'push (chunked)' '
test $HEAD = $(git rev-parse --verify HEAD))
'
+## References of remote: atomic1(1) master(2) collateral(2) other(2)
+## References of local : atomic2(2) master(1) collateral(3) other(2) collateral1(3) atomic(1)
+## Atomic push : master(1) collateral(3) atomic(1)
test_expect_success 'push --atomic also prevents branch creation, reports collateral' '
# Setup upstream repo - empty for now
d=$HTTPD_DOCUMENT_ROOT_PATH/atomic-branches.git &&
@@ -189,7 +192,8 @@ test_expect_success 'push --atomic also prevents branch creation, reports collat
test_commit atomic2 &&
git branch collateral &&
git branch other &&
- git push "$up" master collateral other &&
+ git push "$up" atomic1 master collateral other &&
+ git tag -d atomic1 &&
# collateral is a valid push, but should be failed by atomic push
git checkout collateral &&
@@ -224,7 +228,11 @@ test_expect_success 'push --atomic also prevents branch creation, reports collat
# the collateral failure refs should be indicated to the user
grep "^ ! .*rejected.* atomic -> atomic .*atomic push failed" output &&
- grep "^ ! .*rejected.* collateral -> collateral .*atomic push failed" output
+ grep "^ ! .*rejected.* collateral -> collateral .*atomic push failed" output &&
+
+ # never report what we do not push
+ ! grep "^ ! .*rejected.* atomic1 " output &&
+ ! grep "^ ! .*rejected.* other " output
'
test_expect_success 'push --atomic fails on server-side errors' '