mirror of
https://github.com/powerline/powerline.git
synced 2025-07-27 07:44:36 +02:00
Use --no-optional-locks
to reduce conflicts with other git editors (#2098)
Adding --no-optional-locks will cause fewer interference with other git clients.
This commit is contained in:
parent
59a5425597
commit
65f968ad3a
@ -179,19 +179,19 @@ except ImportError:
|
|||||||
return readlines(('git',) + args, directory)
|
return readlines(('git',) + args, directory)
|
||||||
|
|
||||||
def stash(self):
|
def stash(self):
|
||||||
return sum(1 for _ in self._gitcmd(self.directory, 'stash', 'list'))
|
return sum(1 for _ in self._gitcmd(self.directory, '--no-optional-locks', 'stash', 'list'))
|
||||||
|
|
||||||
def do_status(self, directory, path):
|
def do_status(self, directory, path):
|
||||||
if path:
|
if path:
|
||||||
try:
|
try:
|
||||||
return next(self._gitcmd(directory, 'status', '--porcelain', '--ignored', '--', path))[:2]
|
return next(self._gitcmd(directory, '--no-optional-locks', 'status', '--porcelain', '--ignored', '--', path))[:2]
|
||||||
except StopIteration:
|
except StopIteration:
|
||||||
return None
|
return None
|
||||||
else:
|
else:
|
||||||
wt_column = ' '
|
wt_column = ' '
|
||||||
index_column = ' '
|
index_column = ' '
|
||||||
untracked_column = ' '
|
untracked_column = ' '
|
||||||
for line in self._gitcmd(directory, 'status', '--porcelain'):
|
for line in self._gitcmd(directory, '--no-optional-locks', 'status', '--porcelain'):
|
||||||
if line[0] == '?':
|
if line[0] == '?':
|
||||||
untracked_column = 'U'
|
untracked_column = 'U'
|
||||||
continue
|
continue
|
||||||
|
Loading…
x
Reference in New Issue
Block a user