Bug 1339240 - Detect git worktrees in MachCommandConditions.is_git. r=chmanchester

--HG--
extra : rebase_source : 1763953383ead9f9985fdadc0e862ace23cb2b21
This commit is contained in:
Mike Hommey 2017-02-21 15:53:27 +09:00
parent 81a2b977dd
commit 3a2a54e7d2

View File

@ -785,7 +785,7 @@ class MachCommandConditions(object):
"""Must have a git source checkout."""
if hasattr(cls, 'substs'):
top_srcdir = cls.substs.get('top_srcdir')
return top_srcdir and os.path.isdir(os.path.join(top_srcdir, '.git'))
return top_srcdir and os.path.exists(os.path.join(top_srcdir, '.git'))
return False