diff --git a/hgext/git/__init__.py b/hgext/git/__init__.py --- a/hgext/git/__init__.py +++ b/hgext/git/__init__.py @@ -96,9 +96,12 @@ def _makestore(orig, requirements, storebasepath, vfstype): - if os.path.exists( - os.path.join(storebasepath, b'this-is-git') - ) and os.path.exists(os.path.join(storebasepath, b'..', b'.git')): + reqsf = os.path.join(storebasepath, b'requirements') + reqs = set() + if os.path.exists(reqsf): + with open(reqsf, 'rb') as f: + reqs = {l.strip() for l in f} + if b'git' in reqs and os.path.exists(os.path.join(storebasepath, b'..', b'.git')): return gitstore(storebasepath, vfstype) return orig(requirements, storebasepath, vfstype) @@ -128,8 +131,6 @@ os.path.join(path, b'.git', b'info', b'exclude'), 'ab' ) as exclude: exclude.write(b'\n.hg\n') - with open(os.path.join(dothg, b'this-is-git'), 'wb') as f: - pass with open(os.path.join(dothg, b'requirements'), 'wb') as f: f.write(b'git\n')