diff options
author | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2020-05-15 14:30:30 -0400 |
---|---|---|
committer | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2020-05-15 14:30:30 -0400 |
commit | 49b6717b785b82258f3647c79095673a8a3d8bac (patch) | |
tree | 745becbf0e60abbb48ddcf033e348e183f4660e7 | |
parent | be5c8a1de09436ed8933bc4ef10c71e5fe1261ef (diff) | |
download | b4-49b6717b785b82258f3647c79095673a8a3d8bac.tar.gz |
Relax branch sanity-checking logic
Git has a lot of internal logic matching free-form branch names to
actual branches, so don't try to second-guess what it finds acceptable.
Reported-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
-rw-r--r-- | b4/ty.py | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -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 |