summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2016-08-18 01:00:02 +0200
committerGitHub <noreply@github.com>2016-08-18 01:00:02 +0200
commit657cd7e47571710246375433795ab60520e20434 (patch)
treef237c738c0af4ed1ca52903b8c176d511baed483
parent58934b8f939d93f170858a829c0a79657b3885e0 (diff)
parent26bb778b34b93537cfbfd5c556d3810f2cf3f76e (diff)
downloadgitpython-657cd7e47571710246375433795ab60520e20434.tar.gz
Merge pull request #498 from DoomHammer/try-git-dir
Use $GIT_DIR when set
-rw-r--r--git/repo/base.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/git/repo/base.py b/git/repo/base.py
index 57f87df6..312c01ef 100644
--- a/git/repo/base.py
+++ b/git/repo/base.py
@@ -141,7 +141,7 @@ class Repo(object):
self.working_dir = None
self._working_tree_dir = None
self.git_dir = None
- curpath = epath
+ curpath = os.getenv('GIT_DIR', epath)
# walk up the path to find the .git dir
while curpath: