summaryrefslogtreecommitdiffstats
path: root/pre_commit/git.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-03-08 17:48:47 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-03-08 17:48:47 +0000
commit4db15c5b771323f1acdeb06e4acc671856da5ea9 (patch)
tree1cde2767753275f2f87a34a2606b2415a467ff09 /pre_commit/git.py
parentAdding upstream version 2.10.1. (diff)
downloadpre-commit-4db15c5b771323f1acdeb06e4acc671856da5ea9.tar.xz
pre-commit-4db15c5b771323f1acdeb06e4acc671856da5ea9.zip
Adding upstream version 2.11.0.upstream/2.11.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'pre_commit/git.py')
-rw-r--r--pre_commit/git.py4
1 files changed, 2 insertions, 2 deletions
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 '