mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-18 12:52:44 +01:00
backport_pr: exit early when backport branch already exists
This commit is contained in:
parent
a7459e7463
commit
1930368fd5
3
dist/tools/backport_pr/backport_pr.py
vendored
3
dist/tools/backport_pr/backport_pr.py
vendored
@ -174,6 +174,9 @@ def main():
|
||||
# Build topic branch in temp dir
|
||||
new_branch = args.backport_branch_fmt.format(release=release_shortname,
|
||||
origbranch=orig_branch)
|
||||
if new_branch in repo.branches:
|
||||
print("ERROR: Branch {} already exists".format(new_branch))
|
||||
sys.exit(1)
|
||||
worktree_dir = os.path.join(args.gitdir, WORKTREE_SUBDIR)
|
||||
repo.git.worktree("add", "-b",
|
||||
new_branch,
|
||||
|
Loading…
Reference in New Issue
Block a user