normalize branch name without origin/ (#29690)
This commit is contained in:
parent
f40cce22b0
commit
2293455d29
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue