We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2d47232 commit bdd4368Copy full SHA for bdd4368
git/repo/fun.py
@@ -35,7 +35,7 @@ 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')) or os.environ.has_key('GIT_OBJECT_DIRECTORY')) \
+ if (osp.isdir(osp.join(d, 'objects')) or 'GIT_OBJECT_DIRECTORY' in os.environ) \
39
and osp.isdir(osp.join(d, 'refs')):
40
headref = osp.join(d, 'HEAD')
41
return osp.isfile(headref) or \
0 commit comments