]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
script/autobuild.py: add support git worktree
authorStefan Metzmacher <metze@samba.org>
Thu, 27 Feb 2020 22:58:42 +0000 (23:58 +0100)
committerKarolin Seeger <kseeger@samba.org>
Wed, 3 Mar 2021 10:13:11 +0000 (10:13 +0000)
.git is not always a directory, with 'git worktree' it's a file.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit f9374d0a4ecc11acc46884feec28d138accc6dab)

script/autobuild.py

index f5cf2a85ca091b366aced1918bfa6c01c093823f..890059fe3424c6ad2603aac06a9ed657d129187d 100755 (executable)
@@ -37,7 +37,7 @@ def find_git_root():
     '''get to the top of the git repo'''
     p = os.getcwd()
     while p != '/':
-        if os.path.isdir(os.path.join(p, ".git")):
+        if os.path.exists(os.path.join(p, ".git")):
             return p
         p = os.path.abspath(os.path.join(p, '..'))
     return None