Bug 1313446 - Detect a git repository when inside a git worktree. r=glandium

MozReview-Commit-ID: 8ngY6kNcp05
This commit is contained in:
Kartikaya Gupta
2016-12-08 08:28:36 -10:00
parent f229f9d983
commit 23c60e5edd

View File

@@ -99,7 +99,7 @@ def get_repository_object(path):
''' '''
if os.path.isdir(os.path.join(path, '.hg')): if os.path.isdir(os.path.join(path, '.hg')):
return HgRepository(path) return HgRepository(path)
elif os.path.isdir(os.path.join(path, '.git')): elif os.path.exists(os.path.join(path, '.git')):
return GitRepository(path) return GitRepository(path)
else: else:
raise Exception('Unknown VCS, or not a source checkout: %s' % path) raise Exception('Unknown VCS, or not a source checkout: %s' % path)