Enable detection of bare repositories as a local git repo

This commit is contained in:
Lincoln Stoll 2009-10-26 17:52:32 +01:00
parent b1e1caad4a
commit 86d0cc6948

View File

@ -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