diff --git a/src/git_flow/command/branch.py b/src/git_flow/command/branch.py index 73d1818..5c6db4b 100644 --- a/src/git_flow/command/branch.py +++ b/src/git_flow/command/branch.py @@ -46,7 +46,11 @@ class BranchCommand(Command): self.current_branch = Git.get_current_branch() self.environments = self.flowconfig["flow.branches"].split(",") - (current_environment, _) = self.get_branch_env_and_type(self.current_branch) + + if self.current_branch in self.environments: + current_environment = self.current_branch + else: + (current_environment, _) = self.get_branch_env_and_type(self.current_branch) if args.trash: self.show_branches(TRASH_BRANCH_PREFIX)