From ca01361b3da3eded9b45dcd5fe1326f48372308a Mon Sep 17 00:00:00 2001 From: Mateusz Rymuszka Date: Wed, 8 Jun 2022 17:56:59 +0200 Subject: [PATCH] Remove redundant on-tags argument from list-diff --- pkg/cli/list_diff.go | 4 +--- test/e2e/list_diff_on_tags.rb | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/pkg/cli/list_diff.go b/pkg/cli/list_diff.go index 9bb13e0..98cc345 100644 --- a/pkg/cli/list_diff.go +++ b/pkg/cli/list_diff.go @@ -19,9 +19,8 @@ var listDiffCmd = &cobra.Command{ defaultBranch := fetchOptionalStringFlag(cmd, "default-branch") defaultRange := fetchOptionalStringFlag(cmd, "default-range") branchRange := fetchOptionalStringFlag(cmd, "branch-range") - onTags := fetchOptionalBoolFlag(cmd, "on-tags") - gitDiffSet := git.NewDiffSet(defaultBranch, defaultRange, branchRange, onTags) + gitDiffSet := git.NewDiffSet(defaultBranch, defaultRange, branchRange, true) if gitDiffSet.IsEvaluationNeeded() { println("Listing diffs for tags is not supported.") @@ -60,7 +59,6 @@ func init() { listDiffCmd.Flags().String("default-branch", "", "default branch of repository") listDiffCmd.Flags().String("default-range", "", "default range for evaluation") listDiffCmd.Flags().String("branch-range", "", "branch range for evaluation") - listDiffCmd.Flags().Bool("on-tags", true, "if commands is running on tags") rootCmd.AddCommand(listDiffCmd) } diff --git a/test/e2e/list_diff_on_tags.rb b/test/e2e/list_diff_on_tags.rb index a5d4034..c53faa7 100644 --- a/test/e2e/list_diff_on_tags.rb +++ b/test/e2e/list_diff_on_tags.rb @@ -65,7 +65,7 @@ assert_eq($?.exitstatus, 0) assert_eq([], output) -assert_eq(["Running on a tag, skipping evaluation."], error) +assert_eq(["Listing diffs for tags is not supported."], error) repo.run(%{ export SEMAPHORE_GIT_REF_TYPE=branch