mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 15:27:13 +03:00
subrepo: parse git status's human-readable output
Older git versions do not have a machine-readable output, but the default format has not changed over time.
This commit is contained in:
parent
d9f3d5258c
commit
11aba86609
@ -719,10 +719,9 @@ class gitsubrepo(object):
|
||||
if self._state[1] != self._gitstate(): # version checked out changed?
|
||||
return True
|
||||
# check for staged changes or modified files; ignore untracked files
|
||||
# docs say --porcelain flag is future-proof format
|
||||
changed = self._gitcommand(['status', '--porcelain',
|
||||
'--untracked-files=no'])
|
||||
return bool(changed)
|
||||
status = self._gitcommand(['status'])
|
||||
return ('\n# Changed but not updated:' in status or
|
||||
'\n# Changes to be committed:' in status)
|
||||
|
||||
def get(self, state):
|
||||
source, revision, kind = state
|
||||
|
Loading…
Reference in New Issue
Block a user