From 53b65e074e4d62ea5d0251b37c35fd055e403110 Mon Sep 17 00:00:00 2001 From: niyaton Date: Mon, 25 Feb 2013 01:22:30 +0900 Subject: Added support for separeted git dir. --- git/repo/base.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'git/repo/base.py') 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 -- cgit v1.2.3 From 706d3a28b6fa2d7ff90bbc564a53f4007321534f Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Wed, 19 Nov 2014 11:20:01 +0100 Subject: Minor fix to make read_gitfile work . --- git/repo/base.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'git/repo/base.py') diff --git a/git/repo/base.py b/git/repo/base.py index a111d643..5273d4b2 100644 --- a/git/repo/base.py +++ b/git/repo/base.py @@ -35,8 +35,8 @@ from fun import ( rev_parse, is_git_dir, find_git_dir, - touch - read_gitfile, + read_gitfile, + touch, ) import os @@ -117,7 +117,7 @@ class Repo(object): self.git_dir = gitpath self._working_tree_dir = curpath break - gitpath = read_gitfile(gitpath) + gitpath = read_gitfile(curpath) if gitpath: self.git_dir = gitpath self._working_tree_dir = curpath -- cgit v1.2.3