mirror of
https://github.com/samba-team/samba.git
synced 2025-03-11 16:58:40 +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> (cherry picked from commit f9374d0a4ecc11acc46884feec28d138accc6dab)
This commit is contained in:
parent
237a51d926
commit
833739c1e8
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user