From fa5ef2f7043154e9abd97282e0c876539b5b1bb0 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 30 Jan 2021 07:41:17 +0100 Subject: Merging upstream version 2.10.0. Signed-off-by: Daniel Baumann --- pre_commit/git.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pre_commit/git.py') diff --git a/pre_commit/git.py b/pre_commit/git.py index 5096274..bec816c 100644 --- a/pre_commit/git.py +++ b/pre_commit/git.py @@ -61,7 +61,7 @@ def get_root() -> str: 'git failed. Is it installed, and are you in a Git repository ' 'directory?', ) - if os.path.commonpath((root, git_dir)) == git_dir: + if os.path.samefile(root, git_dir): raise FatalError( 'git toplevel unexpectedly empty! make sure you are not ' 'inside the `.git` directory of your repository.', -- cgit v1.2.3