mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 08:47:12 +03:00
Enable detection of bare repositories as a local git repo
This commit is contained in:
parent
b1e1caad4a
commit
86d0cc6948
@ -36,6 +36,12 @@ def _local(path):
|
||||
if (os.path.exists(os.path.join(p, '.git')) and
|
||||
not os.path.exists(os.path.join(p, '.hg'))):
|
||||
return gitrepo
|
||||
# detect a bare repository
|
||||
if (os.path.exists(os.path.join(p, 'HEAD')) and
|
||||
os.path.exists(os.path.join(p, 'objects')) and
|
||||
os.path.exists(os.path.join(p, 'refs')) and
|
||||
not os.path.exists(os.path.join(p, '.hg'))):
|
||||
return gitrepo
|
||||
return _oldlocal(path)
|
||||
|
||||
hg.schemes['file'] = _local
|
||||
|
Loading…
Reference in New Issue
Block a user