From: SZEDER Gábor Date: Wed, 07 Sep 2016 15:12:47 GMT Subject: [PATCH 1/5] t7004-tag: delete unnecessary tags with test_when_finished Message-ID: <20160907151251.30978-2-szeder@ira.uka.de> In-Reply-To: <20160907151251.30978-1-szeder@ira.uka.de> The '--force is moot with a non-existing tag name' test creates two new tags, which are then deleted right after the test is finished, outside the test_expect_success block, allowing 'git tag -d's output to pollute the test output. Use test_when_finished to delete those tags. Signed-off-by: SZEDER Gábor --- t/t7004-tag.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t7004-tag.sh b/t/t7004-tag.sh index 8b0f71a2ac15..396cffeeb5ad 100755 --- a/t/t7004-tag.sh +++ b/t/t7004-tag.sh @@ -122,11 +122,11 @@ test_expect_success '--force can create a tag with the name of one existing' ' tag_exists mytag' test_expect_success '--force is moot with a non-existing tag name' ' + test_when_finished git tag -d newtag forcetag && git tag newtag >expect && git tag --force forcetag >actual && test_cmp expect actual ' -git tag -d newtag forcetag # deleting tags: -- 2.10.0.74.g6632b1b