summaryrefslogtreecommitdiff
path: root/b4/ty.py
diff options
context:
space:
mode:
Diffstat (limited to 'b4/ty.py')
-rw-r--r--b4/ty.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/b4/ty.py b/b4/ty.py
index 4271986..382ce93 100644
--- a/b4/ty.py
+++ b/b4/ty.py
@@ -567,13 +567,10 @@ def get_wanted_branch(cmdargs):
logger.debug('will check branch=%s', wantbranch)
else:
# Make sure it's a real branch
- gitargs = ['branch', '--format=%(refname)', '--list', '--all']
+ gitargs = ['branch', '--format=%(refname)', '--list', '--all', cmdargs.branch]
lines = b4.git_get_command_lines(gitdir, gitargs)
if not len(lines):
- logger.critical('Not able to get a list of branches (git branch --list --all)')
- sys.exit(1)
- if f'refs/heads/{cmdargs.branch}' not in lines:
- logger.critical('Requested branch %s not found in git branch --list --all', cmdargs.branch)
+ logger.critical('Requested branch not found in git branch --list --all %s', cmdargs.branch)
sys.exit(1)
wantbranch = cmdargs.branch