From: "Martin Ågren" <firstname.lastname@example.org> To: Phil Hord <email@example.com> Cc: firstname.lastname@example.org Subject: [PATCH] t7004: check existence of correct tag Date: Thu, 8 Aug 2019 14:53:30 +0200 [thread overview] Message-ID: <email@example.com> (raw) In-Reply-To: <CAN0heSptKHL8mrU9DTXT9T7HDN56a3+DAGczxkEtbGxp9sB8hg@mail.gmail.com> We try to delete the non-existing tag "anothertag", but for the verifications, we check that the tag "myhead" doesn't exist. "myhead" isn't used in this test except for this checking. Comparing to the test two tests earlier, it looks like a copy-paste mistake. Perhaps it's overkill to check that `git tag -d` didn't decide to *create* a tag. But since we're trying to be this careful, let's actually check the correct tag. While we're doing this, let's use a more descriptive tag name instead -- "nonexistingtag" should be obvious. Signed-off-by: Martin Ågren <firstname.lastname@example.org> --- > Probably worth inspecting the output of that `git tag -d` a bit in > t7004, to make sure we just claim to delete one tag, and have errors. Here's something I noticed while looking into this test. If you do expand on this test, feel free to pick this up, either as a preparatory patch or squash it into your "expand test" patch (if you do one). If you don't pick this up at all, I'll pursue it separately, later. Martin t/t7004-tag.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/t/t7004-tag.sh b/t/t7004-tag.sh index 80eb13d94e..e4cf605907 100755 --- a/t/t7004-tag.sh +++ b/t/t7004-tag.sh @@ -227,10 +227,10 @@ test_expect_success \ test_expect_success \ 'trying to delete two tags, existing and not, should fail in the 2nd' ' tag_exists mytag && - ! tag_exists myhead && - test_must_fail git tag -d mytag anothertag && + ! tag_exists nonexistingtag && + test_must_fail git tag -d mytag nonexistingtag && ! tag_exists mytag && - ! tag_exists myhead + ! tag_exists nonexistingtag ' test_expect_success 'trying to delete an already deleted tag should fail' \ -- 2.23.0.rc0.30.g51cf315870
next prev parent reply other threads:[~2019-08-08 12:53 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-08-08 3:59 [PATCH 1/1] delete multiple tags in a single transaction Phil Hord 2019-08-08 12:47 ` Martin Ågren 2019-08-08 12:53 ` Martin Ågren [this message] 2019-08-08 18:15 ` Elijah Newren 2019-08-08 23:43 ` Phil Hord 2019-08-09 3:05 ` Jeff King 2019-08-08 19:39 ` Junio C Hamano 2019-08-08 23:58 ` Phil Hord 2019-11-13 19:39 [PATCH] t7004: check existence of correct tag Martin Ågren 2019-11-14 6:35 ` Jeff King
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style List information: http://vger.kernel.org/majordomo-info.html * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --subject='Re: [PATCH] t7004: check existence of correct tag' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Code repositories for project(s) associated with this inbox: https://80x24.org/mirrors/git.git This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).