diff options
author | niyaton <niyaton@gmail.com> | 2013-02-25 01:22:30 +0900 |
---|---|---|
committer | niyaton <niyaton@gmail.com> | 2013-02-27 15:55:24 +0900 |
commit | 53b65e074e4d62ea5d0251b37c35fd055e403110 (patch) | |
tree | 3032d352cf8493e32eed1f911730f1081eefa5d5 /git/repo/base.py | |
parent | 0b820e617ab21b372394bf12129c30174f57c5d7 (diff) | |
download | gitpython-53b65e074e4d62ea5d0251b37c35fd055e403110.tar.gz |
Added support for separeted git dir.
Diffstat (limited to 'git/repo/base.py')
-rw-r--r-- | git/repo/base.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/git/repo/base.py b/git/repo/base.py index 20c96b22..7dcf409d 100644 --- a/git/repo/base.py +++ b/git/repo/base.py @@ -32,6 +32,7 @@ from gitdb.util import ( from fun import ( rev_parse, is_git_dir, + read_gitfile, touch ) @@ -113,6 +114,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 |