From 5c5d261845ee2807372e2d37b28c09485418a040 Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Fri, 17 Mar 2023 13:16:00 -0400 Subject: Fix "meson subprojects checkout -b" regression The argument position is wrong since https://github.com/mesonbuild/meson/commit/1c631ec8abd34df9971ab03faf22d709f1c54348 --- mesonbuild/msubprojects.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mesonbuild/msubprojects.py b/mesonbuild/msubprojects.py index 091f1eb..61ba3a4 100755 --- a/mesonbuild/msubprojects.py +++ b/mesonbuild/msubprojects.py @@ -249,9 +249,10 @@ class Runner: return True def git_checkout(self, revision: str, create: bool = False) -> bool: - cmd = ['checkout', '--ignore-other-worktrees', revision, '--'] + cmd = ['checkout', '--ignore-other-worktrees'] if create: - cmd.insert(1, '-b') + cmd.append('-b') + cmd += [revision, '--'] try: # Stash local changes, commits can always be found back in reflog, to # avoid any data lost by mistake. -- cgit v1.1