diff options
author | Junio C Hamano <gitster@pobox.com> | 2019-09-30 13:19:28 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-09-30 13:19:28 +0900 |
commit | fe048e4fd905e5c45b07381339ef627f57cf0822 (patch) | |
tree | 6c9dc21c9f8ff799d33b826fc8bb56659f8ebf73 /t | |
parent | Merge branch 'dt/remote-helper-doc-re-lock-option' (diff) | |
parent | push: disallow --all and refspecs when remote.<name>.mirror is set (diff) | |
download | tgif-fe048e4fd905e5c45b07381339ef627f57cf0822.tar.xz |
Merge branch 'tg/push-all-in-mirror-forbidden'
Fix an earlier regression to "git push --all" which should have
been forbidden when the target remote repository is set to be a
mirror.
* tg/push-all-in-mirror-forbidden:
push: disallow --all and refspecs when remote.<name>.mirror is set
Diffstat (limited to 't')
-rwxr-xr-x | t/t5517-push-mirror.sh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/t/t5517-push-mirror.sh b/t/t5517-push-mirror.sh index c05a661400..e4edd56404 100755 --- a/t/t5517-push-mirror.sh +++ b/t/t5517-push-mirror.sh @@ -265,4 +265,14 @@ test_expect_success 'remote.foo.mirror=no has no effect' ' ' +test_expect_success 'push to mirrored repository with refspec fails' ' + mk_repo_pair && + ( + cd master && + echo one >foo && git add foo && git commit -m one && + git config --add remote.up.mirror true && + test_must_fail git push up master + ) +' + test_done |