From 84c011ae6133fb007046d8eb66c01d0de80b3500 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 8 Mar 2021 18:48:51 +0100 Subject: Merging upstream version 2.11.0. Signed-off-by: Daniel Baumann --- pre_commit/git.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pre_commit/git.py') diff --git a/pre_commit/git.py b/pre_commit/git.py index bec816c..4bf2823 100644 --- a/pre_commit/git.py +++ b/pre_commit/git.py @@ -52,10 +52,10 @@ def get_root() -> str: # "rev-parse --show-cdup" to get the appropriate path, but must perform # an extra check to see if we are in the .git directory. try: - root = os.path.realpath( + root = os.path.abspath( cmd_output('git', 'rev-parse', '--show-cdup')[1].strip(), ) - git_dir = os.path.realpath(get_git_dir()) + git_dir = os.path.abspath(get_git_dir()) except CalledProcessError: raise FatalError( 'git failed. Is it installed, and are you in a Git repository ' -- cgit v1.2.3