From 9bba2d074ce26311334bc4adad1bfe12e894e6bb Mon Sep 17 00:00:00 2001 From: Marian Buschsieweke Date: Fri, 11 Nov 2022 09:28:38 +0100 Subject: [PATCH] tools/backport_pr: finally fix running outside of repo's root It turned out that 4983f8bb6042018ce762c0d64b21ca09ccb00ceb was not enough to allow the tool to be executed from within `dist/tools/backport_pr`. With this, I successfully tested it :) --- dist/tools/backport_pr/backport_pr.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist/tools/backport_pr/backport_pr.py b/dist/tools/backport_pr/backport_pr.py index fba9ed0a2d..20b8ff8e2d 100755 --- a/dist/tools/backport_pr/backport_pr.py +++ b/dist/tools/backport_pr/backport_pr.py @@ -240,7 +240,7 @@ def main(): if new_branch in repo.branches: print(f"ERROR: Branch {new_branch} already exists") sys.exit(1) - worktree_dir = os.path.join(args.gitdir, WORKTREE_SUBDIR) + worktree_dir = os.path.join(repo.working_dir, WORKTREE_SUBDIR) repo.git.worktree( "add", "-b",