Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 86b269e commit 2d47232Copy full SHA for 2d47232
git/repo/fun.py
@@ -35,7 +35,8 @@ def is_git_dir(d):
35
There is the unlikely danger to throw if we see directories which just look like a worktree dir,
36
but are none."""
37
if osp.isdir(d):
38
- 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')) \
39
+ and osp.isdir(osp.join(d, 'refs')):
40
headref = osp.join(d, 'HEAD')
41
return osp.isfile(headref) or \
42
(osp.islink(headref) and
0 commit comments