summaryrefslogtreecommitdiff
path: root/git
diff options
context:
space:
mode:
authorSebastian Thiel <sebastian.thiel@icloud.com>2020-04-11 12:54:42 +0800
committerSebastian Thiel <sebastian.thiel@icloud.com>2020-04-11 12:54:42 +0800
commit2d472327f4873a7a4123f7bdaecd967a86e30446 (patch)
treedbcb52e378f7973c53cc5730e5d3f43edc89eee3 /git
parent86b269e1bff281e817b6ea820989f26d1c2a4ba6 (diff)
downloadgitpython-2d472327f4873a7a4123f7bdaecd967a86e30446.tar.gz
Try again to apply patch related to #1000
Diffstat (limited to 'git')
-rw-r--r--git/repo/fun.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/git/repo/fun.py b/git/repo/fun.py
index 784a70bf..e3a7bc57 100644
--- a/git/repo/fun.py
+++ b/git/repo/fun.py
@@ -35,7 +35,8 @@ def is_git_dir(d):
There is the unlikely danger to throw if we see directories which just look like a worktree dir,
but are none."""
if osp.isdir(d):
- if osp.isdir(osp.join(d, 'objects')) and osp.isdir(osp.join(d, 'refs')):
+ if (osp.isdir(osp.join(d, 'objects')) or os.environ.has_key('GIT_OBJECT_DIRECTORY')) \
+ and osp.isdir(osp.join(d, 'refs')):
headref = osp.join(d, 'HEAD')
return osp.isfile(headref) or \
(osp.islink(headref) and