From d6dc4b667bb0f71aaa2a63d801a37471c16d20b7 Mon Sep 17 00:00:00 2001 From: Masayuki Nagamachi Date: Wed, 10 Feb 2021 18:43:30 +0000 Subject: [PATCH] Support git working directory created by `git worktree add` (fixes issue #2673) --- tools/git_util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/git_util.py b/tools/git_util.py index 3a3abb441..886d8278d 100644 --- a/tools/git_util.py +++ b/tools/git_util.py @@ -16,7 +16,7 @@ else: def is_checkout(path): """ Returns true if the path represents a git checkout. """ - return os.path.isdir(os.path.join(path, '.git')) + return os.path.exists(os.path.join(path, '.git')) def is_ancestor(path='.', commit1='HEAD', commit2='master'):