From 2e2d2eaa10499537c9af07dd866ac8e613c3da02 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 11 Aug 2021 13:26:41 +0200 Subject: wafsamba: add support git worktree to vcs_dir_contents() .git is not always a directory, with 'git worktree' it's a file. Note we could also use 'git rev-parse --show-toplevel', but that's a patch for another day. Signed-off-by: Stefan Metzmacher Reviewed-by: Andreas Schneider --- buildtools/wafsamba/samba_dist.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'buildtools') diff --git a/buildtools/wafsamba/samba_dist.py b/buildtools/wafsamba/samba_dist.py index c211a94d3db..0218cad6271 100644 --- a/buildtools/wafsamba/samba_dist.py +++ b/buildtools/wafsamba/samba_dist.py @@ -109,7 +109,7 @@ def vcs_dir_contents(path): """ repo = path while repo != "/": - if os.path.isdir(os.path.join(repo, ".git")): + if os.path.exists(os.path.join(repo, ".git")): ls_files_cmd = [ 'git', 'ls-files', '--full-name', os.path.relpath(path, repo) ] cwd = None -- cgit v1.2.1