aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2020-12-07 17:06:14 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2021-01-06 14:53:07 +0530
commitd89d71cd56e5d6a963b0887a74b168df275c6e63 (patch)
tree4694d73019d7bd01ad12c9b13d7df37d8b4fba97
parent44d14c972baf7df566b4afbea2426a4d6dbd2d10 (diff)
downloadmeson-d89d71cd56e5d6a963b0887a74b168df275c6e63.zip
meson-d89d71cd56e5d6a963b0887a74b168df275c6e63.tar.gz
meson-d89d71cd56e5d6a963b0887a74b168df275c6e63.tar.bz2
msubprojects: Ignore worktrees when checking out
Otherwise it's not possible to share git subprojects via worktrees when creating a worktree of a git repository that uses meson subprojects. The downside is that the user needs to be careful while adding commits to each tree's index.
-rwxr-xr-xmesonbuild/msubprojects.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/msubprojects.py b/mesonbuild/msubprojects.py
index 20639cb..8fb31f2 100755
--- a/mesonbuild/msubprojects.py
+++ b/mesonbuild/msubprojects.py
@@ -85,7 +85,7 @@ def git_reset(repo_dir, revision):
return True
def git_checkout(repo_dir, revision, create=False):
- cmd = ['checkout', revision, '--']
+ cmd = ['checkout', '--ignore-other-worktrees', revision, '--']
if create:
cmd.insert('-b', 1)
try: