diff options
Diffstat (limited to 'ranger/ext/vcs/git.py')
-rw-r--r-- | ranger/ext/vcs/git.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ranger/ext/vcs/git.py b/ranger/ext/vcs/git.py index 640d8bfe..c6cb2bf3 100644 --- a/ranger/ext/vcs/git.py +++ b/ranger/ext/vcs/git.py @@ -161,12 +161,13 @@ class Git(Vcs): return 'none' output = self._run(['rev-list', '--left-right', '{0:s}...{1:s}'.format(remote, head)]) + # pylint: disable=no-member ahead = re.search(r'^>', output, flags=re.MULTILINE) behind = re.search(r'^<', output, flags=re.MULTILINE) + # pylint: enable=no-member if ahead: return 'diverged' if behind else 'ahead' - else: - return 'behind' if behind else 'sync' + return 'behind' if behind else 'sync' def data_branch(self): try: |