From ede325d15ba9cba0e7fe9ee693085fd5db966629 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Mon, 12 Jan 2015 11:16:52 +0100 Subject: Removed all previously added invocations of os.path.realpath as it wasn't required afterall. Turns out that the now removed `read_gitfile` functions applied os.path.realpath which caused the issue described in #224. Fixes #224 --- git/index/base.py | 1 - git/repo/base.py | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/git/index/base.py b/git/index/base.py index c6e57f13..66fd5b1f 100644 --- a/git/index/base.py +++ b/git/index/base.py @@ -535,7 +535,6 @@ class IndexFile(LazyMixin, diff.Diffable, Serializable): if it is not within our git direcotory""" if not os.path.isabs(path): return path - path = os.path.realpath(path) relative_path = path.replace(self.repo.working_tree_dir + os.sep, "") if relative_path == path: raise ValueError("Absolute path %r is not in git repository at %r" % (path, self.repo.working_tree_dir)) diff --git a/git/repo/base.py b/git/repo/base.py index d20d699a..d6efbd58 100644 --- a/git/repo/base.py +++ b/git/repo/base.py @@ -128,14 +128,14 @@ class Repo(object): # walk up the path to find the .git dir while curpath: if is_git_dir(curpath): - self.git_dir = os.path.realpath(curpath) + self.git_dir = curpath self._working_tree_dir = os.path.dirname(self.git_dir) break gitpath = find_git_dir(join(curpath, '.git')) if gitpath is not None: - self.git_dir = os.path.realpath(gitpath) - self._working_tree_dir = os.path.realpath(curpath) + self.git_dir = gitpath + self._working_tree_dir = curpath break if not search_parent_directories: -- cgit v1.2.1