From 833739c1e8fac68582009450ac34a27695a439f0 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 27 Feb 2020 23:58:42 +0100 Subject: 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) --- script/autobuild.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.1