Switch from status + ls-files to status --ignored

This commit is contained in:
ZyX 2013-02-16 02:04:39 +04:00 committed by Kim Silkebækken
parent b8b7cfbbea
commit baaf6cde1d
2 changed files with 3 additions and 6 deletions

View File

@ -70,6 +70,7 @@ recommended for optimal performance and extra features:
* ``pygit2`` * ``pygit2``
* ``mercurial`` * ``mercurial``
* ``psutil`` * ``psutil``
* ``git`` version 1.7.2 and later. Not needed if you have ``pygit2``.
Installation Installation
============ ============

View File

@ -107,11 +107,7 @@ except ImportError:
def status(self, path=None): def status(self, path=None):
if path: if path:
try: try:
return next(self._gitcmd('status', '--porcelain', '--', path))[:2] return next(self._gitcmd('status', '--porcelain', '--ignored', '--', path))[:2]
except StopIteration:
try:
next(self._gitcmd('ls-files', '--ignored', '--exclude-standard', '--others', '--', path))
return '!!'
except StopIteration: except StopIteration:
return None return None
else: else: