wafsamba: add support git worktree to vcs_dir_contents()
authorStefan Metzmacher <metze@samba.org>
Wed, 11 Aug 2021 11:26:41 +0000 (13:26 +0200)
committerStefan Metzmacher <metze@samba.org>
Thu, 12 Aug 2021 08:07:29 +0000 (08:07 +0000)
.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 <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
buildtools/wafsamba/samba_dist.py

index c211a94d3db3f65ada08aa1c431f5015e7c2b669..0218cad62715f5b65641eddd5047553e6f3ab72d 100644 (file)
@@ -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