normalize branch name without origin/ (#29690)

This commit is contained in:
Frédéric Péters 2018-11-18 09:36:44 +01:00
parent f40cce22b0
commit 2293455d29
1 changed files with 3 additions and 0 deletions

View File

@ -400,6 +400,9 @@ def main():
project_name = args[0]
git_project_path = os.path.join(settings.GIT_PATH, os.path.basename(project_name))
atexit.register(clean_git_on_exit, git_project_path)
if options.branch.startswith('origin/'):
# normalize without origin/
options.branch = options.branch[len('origin/'):]
if options.branch.startswith('wip/'):
if os.path.exists(git_project_path):
shutil.rmtree(git_project_path)