Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit eb792ea

Browse filesBrowse files
committed
When using GIT_OBJECT_DIRECTORY, don't require presence of 'objects' subdirectory
This will work for default git object databases only, which use git as object database directly. Related to #1000
1 parent 5db2e0c commit eb792ea
Copy full SHA for eb792ea

1 file changed

+2-1Lines changed: 2 additions & 1 deletion

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎git/repo/fun.py‎

Copy file name to clipboardExpand all lines: git/repo/fun.py
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ def is_git_dir(d):
3535
There is the unlikely danger to throw if we see directories which just look like a worktree dir,
3636
but are none."""
3737
if osp.isdir(d):
38-
if osp.isdir(osp.join(d, 'objects')) and osp.isdir(osp.join(d, 'refs')):
38+
if (osp.isdir(osp.join(d, 'objects')) or os.environ.has_key('GIT_OBJECT_DIRECTORY')) \
39+
and osp.isdir(osp.join(d, 'refs')):
3940
headref = osp.join(d, 'HEAD')
4041
return osp.isfile(headref) or \
4142
(osp.islink(headref) and

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.