diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2015-01-12 11:14:06 +0100 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2015-01-12 11:14:06 +0100 |
commit | 43e430d7fa5298f6db6b1649c1a77c208bacf2fc (patch) | |
tree | ed554025ee4366c76a318f50dfe48ac0783f28f1 /git/repo/base.py | |
parent | dfb0a9c4bca590efaa86f8edc3fdb62bd536bce7 (diff) | |
download | gitpython-43e430d7fa5298f6db6b1649c1a77c208bacf2fc.tar.gz |
Repo paths are now converted to real paths, as well as all paths involved in index related work.
That way, we don't try to compare a real-path to a non-real one, which would make the implementation think
a file is not actually part of the repository.
Fixes #224
Diffstat (limited to 'git/repo/base.py')
-rw-r--r-- | git/repo/base.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/git/repo/base.py b/git/repo/base.py index d6e55553..d20d699a 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 = curpath - self._working_tree_dir = os.path.dirname(curpath) + self.git_dir = os.path.realpath(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 = gitpath - self._working_tree_dir = curpath + self.git_dir = os.path.realpath(gitpath) + self._working_tree_dir = os.path.realpath(curpath) break if not search_parent_directories: |