summaryrefslogtreecommitdiff
path: root/t/t5516-fetch-push.sh
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2018-07-31 13:07:11 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-07-31 16:25:25 (GMT)
commit25f74f5234ffe2f0100b06c657fedb9cc7774ed3 (patch)
treec941b164cb28b78a19767df64e3621e87003cc9c /t/t5516-fetch-push.sh
parent76bcde5956c9094189a2a18b82574ed940e804dd (diff)
downloadgit-25f74f5234ffe2f0100b06c657fedb9cc7774ed3.zip
git-25f74f5234ffe2f0100b06c657fedb9cc7774ed3.tar.gz
git-25f74f5234ffe2f0100b06c657fedb9cc7774ed3.tar.bz2
push tests: fix logic error in "push" test assertion
Fix a logic error that's been here since this test was added in dbfeddb12e ("push: require force for refs under refs/tags/", 2012-11-29). The intent of this test is to force-create a new tag pointing to HEAD~, and then assert that pushing it doesn't work without --force. Instead, the code was not creating a new tag at all, and then failing to push the previous tag for the unrelated reason of providing a refspec that doesn't make any sense. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5516-fetch-push.sh')
-rwxr-xr-xt/t5516-fetch-push.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/t/t5516-fetch-push.sh b/t/t5516-fetch-push.sh
index 4d487d6..82af990 100755
--- a/t/t5516-fetch-push.sh
+++ b/t/t5516-fetch-push.sh
@@ -979,8 +979,8 @@ test_expect_success 'push requires --force to update lightweight tag' '
git tag -f testTag &&
test_must_fail git push ../child2 testTag &&
git push --force ../child2 testTag &&
- git tag -f testTag &&
- test_must_fail git push ../child2 testTag HEAD~ &&
+ git tag -f testTag HEAD~ &&
+ test_must_fail git push ../child2 testTag &&
git push --force ../child2 testTag
)
'