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``
* ``mercurial``
* ``psutil``
* ``git`` version 1.7.2 and later. Not needed if you have ``pygit2``.
Installation
============

View File

@ -107,13 +107,9 @@ except ImportError:
def status(self, path=None):
if path:
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:
return None
return None
else:
wt_column = ' '
index_column = ' '