From 8dfa1685aac22a83ba1f60d1b2d52abf5a3d842f Mon Sep 17 00:00:00 2001 From: "Timothy B. Hartman" Date: Fri, 24 Feb 2017 13:39:49 -0500 Subject: check for GIT_WORK_TREE --- git/repo/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'git/repo') diff --git a/git/repo/base.py b/git/repo/base.py index 85f2d036..2585bc5a 100644 --- a/git/repo/base.py +++ b/git/repo/base.py @@ -133,7 +133,7 @@ class Repo(object): # removed. It's just cleaner. if is_git_dir(curpath): self.git_dir = curpath - self._working_tree_dir = os.path.dirname(self.git_dir) + self._working_tree_dir = os.getenv('GIT_WORK_TREE', os.path.dirname(self.git_dir)) break sm_gitpath = find_submodule_git_dir(osp.join(curpath, '.git')) -- cgit v1.2.3