Skip to content

Commit

Permalink
Revert "When using GIT_OBJECT_DIRECTORY, don't require presence of 'o…
Browse files Browse the repository at this point in the history
…bjects' subdirectory"

This reverts commit eb792ea.

Seems to break CI
Related to #1000
  • Loading branch information
Byron committed Apr 11, 2020
1 parent 4b6d488 commit 644f753
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions git/repo/fun.py
Expand Up @@ -35,8 +35,7 @@ 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')) or os.environ.has_key('GIT_OBJECT_DIRECTORY')) \
and osp.isdir(osp.join(d, 'refs')):
if osp.isdir(osp.join(d, 'objects')) and osp.isdir(osp.join(d, 'refs')):
headref = osp.join(d, 'HEAD')
return osp.isfile(headref) or \
(osp.islink(headref) and
Expand Down

0 comments on commit 644f753

Please sign in to comment.