From 61747bc6ec728de69d54db6ece90ad4617f059b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Tue, 13 Apr 2021 12:41:18 +0100 Subject: meson: fix get-version script for git worktrees For git worktree directories .git is not a directory but a file that points to the real .git dir. The `update_version` script used by other builds works correctly with git worktrees. Signed-off-by: Ralph Giles --- meson/get-version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson/get-version.py b/meson/get-version.py index 0e8b8623..d3835f13 100755 --- a/meson/get-version.py +++ b/meson/get-version.py @@ -31,7 +31,7 @@ if __name__ == '__main__': # check if git checkout git_dir = os.path.join(srcroot, '.git') - is_git = os.path.isdir(git_dir) + is_git = os.path.isdir(git_dir) or os.path.isfile(git_dir) have_git = shutil.which('git') is not None if is_git and have_git: -- cgit v1.2.3