From 4983f8bb6042018ce762c0d64b21ca09ccb00ceb Mon Sep 17 00:00:00 2001 From: Marian Buschsieweke Date: Thu, 10 Nov 2022 09:32:49 +0100 Subject: [PATCH] tools/backport_pr.py: improve usability Add `search_parent_directories=True` to `git.Repo()` so that `backport_pr.py` can be called anywhere within the RIOT git repo without manually passing the repo root path via `--gitdir`. Previously the tool had to be called from the RIOT base repo. --- 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 f2f46c13e4..fba9ed0a2d 100755 --- a/dist/tools/backport_pr/backport_pr.py +++ b/dist/tools/backport_pr/backport_pr.py @@ -224,7 +224,7 @@ def main(): sys.exit(5) print(f"Backport based on branch {release_fullname}") - repo = git.Repo(args.gitdir) + repo = git.Repo(args.gitdir, search_parent_directories=True) # Fetch current upstream upstream_remote = _get_upstream(repo) if not upstream_remote: