From: Stefan Metzmacher Date: Thu, 27 Feb 2020 22:58:42 +0000 (+0100) Subject: script/autobuild.py: add support git worktree X-Git-Tag: samba-4.12.12~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=833739c1e8fac68582009450ac34a27695a439f0;p=thirdparty%2Fsamba.git 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 Reviewed-by: Andrew Bartlett (cherry picked from commit f9374d0a4ecc11acc46884feec28d138accc6dab) --- diff --git a/script/autobuild.py b/script/autobuild.py index f5cf2a85ca0..890059fe342 100755 --- a/script/autobuild.py +++ b/script/autobuild.py @@ -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