aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2023-03-17 13:16:00 -0400
committerXavier Claessens <xclaesse@gmail.com>2023-03-17 15:17:56 -0400
commit5c5d261845ee2807372e2d37b28c09485418a040 (patch)
treed1ca5c16d7f14e46b82c3634c422128be89565aa
parent91b88b1a763c21b899a4c673a84859c8bc63b127 (diff)
downloadmeson-5c5d261845ee2807372e2d37b28c09485418a040.zip
meson-5c5d261845ee2807372e2d37b28c09485418a040.tar.gz
meson-5c5d261845ee2807372e2d37b28c09485418a040.tar.bz2
Fix "meson subprojects checkout -b" regression
The argument position is wrong since https://github.com/mesonbuild/meson/commit/1c631ec8abd34df9971ab03faf22d709f1c54348
-rwxr-xr-xmesonbuild/msubprojects.py5
1 files 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.