Fix "meson subprojects checkout -b" regression

The argument position is wrong since
1c631ec8ab
pull/11548/head
Xavier Claessens 2 years ago committed by Xavier Claessens
parent 91b88b1a76
commit 5c5d261845
  1. 5
      mesonbuild/msubprojects.py

@ -249,9 +249,10 @@ class Runner:
return True return True
def git_checkout(self, revision: str, create: bool = False) -> bool: def git_checkout(self, revision: str, create: bool = False) -> bool:
cmd = ['checkout', '--ignore-other-worktrees', revision, '--'] cmd = ['checkout', '--ignore-other-worktrees']
if create: if create:
cmd.insert(1, '-b') cmd.append('-b')
cmd += [revision, '--']
try: try:
# Stash local changes, commits can always be found back in reflog, to # Stash local changes, commits can always be found back in reflog, to
# avoid any data lost by mistake. # avoid any data lost by mistake.

Loading…
Cancel
Save