Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 26bb778

Browse files
committedAug 17, 2016
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

Lines changed: 1 addition & 1 deletion
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)
Please sign in to comment.