Skip to content

Commit 25f74f5

Browse files
avargitster
authored andcommitted
push tests: fix logic error in "push" test assertion
Fix a logic error that's been here since this test was added in dbfeddb ("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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 76bcde5 commit 25f74f5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

t/t5516-fetch-push.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -979,8 +979,8 @@ test_expect_success 'push requires --force to update lightweight tag' '
979979
git tag -f testTag &&
980980
test_must_fail git push ../child2 testTag &&
981981
git push --force ../child2 testTag &&
982-
git tag -f testTag &&
983-
test_must_fail git push ../child2 testTag HEAD~ &&
982+
git tag -f testTag HEAD~ &&
983+
test_must_fail git push ../child2 testTag &&
984984
git push --force ../child2 testTag
985985
)
986986
'

0 commit comments

Comments
 (0)