From: Stefan Metzmacher Date: Wed, 11 Aug 2021 11:26:41 +0000 (+0200) Subject: script/bisect-test.py: add support git worktree X-Git-Tag: ldb-2.5.0~983 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c7f85146cb50795afcbb1c607e87d163d241c79a;p=thirdparty%2Fsamba.git script/bisect-test.py: add support git worktree .git is not always a directory, with 'git worktree' it's a file. Note we could also use 'git rev-parse --show-toplevel', but that's a patch for another day. Signed-off-by: Stefan Metzmacher Reviewed-by: Andreas Schneider --- diff --git a/script/bisect-test.py b/script/bisect-test.py index b87df54ac09..7c5cd635f58 100755 --- a/script/bisect-test.py +++ b/script/bisect-test.py @@ -48,7 +48,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