diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2014-11-19 11:10:39 +0100 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2014-11-19 11:10:39 +0100 |
commit | 22c4671b58a6289667f7ec132bc5251672411150 (patch) | |
tree | 323e062bd2f7abc294ac3cd047fe51dea0dc7245 /git/repo/base.py | |
parent | 6fc9e6150957ff5e011142ec5e9f8522168602ec (diff) | |
parent | 53b65e074e4d62ea5d0251b37c35fd055e403110 (diff) | |
download | gitpython-22c4671b58a6289667f7ec132bc5251672411150.tar.gz |
Merge branch 'separate-git-dir' of https://github.com/niyaton/GitPython into niyaton-separate-git-dir
Conflicts:
git/repo/base.py
Diffstat (limited to 'git/repo/base.py')
-rw-r--r-- | git/repo/base.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/git/repo/base.py b/git/repo/base.py index a5bbaa64..a111d643 100644 --- a/git/repo/base.py +++ b/git/repo/base.py @@ -36,7 +36,8 @@ from fun import ( is_git_dir, find_git_dir, touch - ) + read_gitfile, + ) import os import sys @@ -52,7 +53,6 @@ __all__ = ('Repo', ) class Repo(object): - """Represents a git repository and allows you to query references, gather commit information, generate diffs, create and clone repositories query the log. @@ -117,6 +117,11 @@ class Repo(object): self.git_dir = gitpath self._working_tree_dir = curpath break + gitpath = read_gitfile(gitpath) + if gitpath: + self.git_dir = gitpath + self._working_tree_dir = curpath + break curpath, dummy = os.path.split(curpath) if not dummy: break |