1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-03 01:18:10 +03:00

script/autobuild.py: add support git worktree

.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>
This commit is contained in:
Stefan Metzmacher 2020-02-27 23:58:42 +01:00
parent 579c27fc4a
commit f9374d0a4e

View File

@ -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