push tests: add more testing for forced tag pushing
commit941a7baa4d7aa592b9373180dcc13aaf2681f7a1
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Tue, 31 Jul 2018 13:07:12 +0000 (31 13:07 +0000)
committerJunio C Hamano <gitster@pobox.com>
Tue, 31 Jul 2018 16:25:25 +0000 (31 09:25 -0700)
tree21571118638be9990d7166d493473e049676c1b5
parent25f74f5234ffe2f0100b06c657fedb9cc7774ed3
push tests: add more testing for forced tag pushing

Improve the tests added in dbfeddb12e ("push: require force for refs
under refs/tags/", 2012-11-29) to assert that the same behavior
applies various other combinations of command-line option and
refspecs.

Supplying either "+" in refspec or "--force" is sufficient to clobber
the reference. With --no-force we still pay attention to "+" in the
refspec, and vice-versa with clobbering kicking in if there's no "+"
in the refspec but "+" is given.

This is consistent with how refspecs work for branches, where either
"+" or "--force" will enable clobbering, with neither taking priority
over the other.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t5516-fetch-push.sh