diff --git a/git/repo/base.py b/git/repo/base.py index 57f87df6c..312c01eff 100644 --- a/git/repo/base.py +++ b/git/repo/base.py @@ -141,7 +141,7 @@ def __init__(self, path=None, odbt=DefaultDBType, search_parent_directories=Fals 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: