Skip to content

Commit 26bb778

Browse files
committed
use $GIT_DIR when set
1 parent 58934b8 commit 26bb778

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

git/repo/base.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ def __init__(self, path=None, odbt=DefaultDBType, search_parent_directories=Fals
141141
self.working_dir = None
142142
self._working_tree_dir = None
143143
self.git_dir = None
144-
curpath = epath
144+
curpath = os.getenv('GIT_DIR', epath)
145145

146146
# walk up the path to find the .git dir
147147
while curpath:

0 commit comments

Comments
 (0)