From: Stefan Metzmacher Date: Wed, 11 Aug 2021 11:26:41 +0000 (+0200) Subject: wafsamba: add support git worktree to vcs_dir_contents() X-Git-Tag: ldb-2.5.0~984 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2e2d2eaa10499537c9af07dd866ac8e613c3da02;p=thirdparty%2Fsamba.git 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 --- 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