summaryrefslogtreecommitdiff
path: root/t/t5611-clone-config.sh
diff options
context:
space:
mode:
authorLibravatar Thomas Gummerer <t.gummerer@gmail.com>2019-09-02 19:08:28 +0100
committerLibravatar Junio C Hamano <gitster@pobox.com>2019-09-03 11:16:54 -0700
commit8e4c8af058d7eb1b887184deb3bf79f3818b3a65 (patch)
tree50b4cd6f2d271ec19feb3aa8c831a628fce46f61 /t/t5611-clone-config.sh
parentGit 2.20.1 (diff)
downloadtgif-8e4c8af058d7eb1b887184deb3bf79f3818b3a65.tar.xz
push: disallow --all and refspecs when remote.<name>.mirror is set
Pushes with --all, or refspecs are disallowed when --mirror is given to 'git push', or when 'remote.<name>.mirror' is set in the config of the repository, because they can have surprising effects. 800a4ab399 ("push: check for errors earlier", 2018-05-16) refactored this code to do that check earlier, so we can explicitly check for the presence of flags, instead of their sideeffects. However when 'remote.<name>.mirror' is set in the config, the TRANSPORT_PUSH_MIRROR flag would only be set after we calling 'do_push()', so the checks would miss it entirely. This leads to surprises for users [*1*]. Fix this by making sure we set the flag (if appropriate) before checking for compatibility of the various options. *1*: https://twitter.com/FiloSottile/status/1163918701462249472 Reported-by: Filippo Valsorda <filippo@ml.filippo.io> Helped-by: Saleem Rashid Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5611-clone-config.sh')
0 files changed, 0 insertions, 0 deletions