diff options
author | Thomas Johannesmeyer <thomas@geeky.gent> | 2019-05-07 14:30:21 +0200 |
---|---|---|
committer | Sebastian Thiel <sthiel@thoughtworks.com> | 2019-07-20 17:59:59 +0800 |
commit | 687c8f0494dde31f86f98dcb48b6f3e1338d4308 (patch) | |
tree | 438877524d3aad2d5c4a5abc2f7109ce90f39906 /git/util.py | |
parent | dac619e4917b0ad43d836a534633d68a871aecca (diff) | |
download | gitpython-687c8f0494dde31f86f98dcb48b6f3e1338d4308.tar.gz |
Implement update call when the object is "up to date" #871
Fixes #871
Diffstat (limited to 'git/util.py')
-rw-r--r-- | git/util.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/git/util.py b/git/util.py index 3ba58857..b0fdc79f 100644 --- a/git/util.py +++ b/git/util.py @@ -390,6 +390,21 @@ class RemoteProgress(object): if len(self.error_lines) > 0 or self._cur_line.startswith(('error:', 'fatal:')): self.error_lines.append(self._cur_line) return [] + elif 'up to date' in self._cur_line: + # Checking this way instead of startswith, because debugging for + # startswith(' = [up to date]') is going to be a major pain if just + # a single space or bracket changes. + + # Strip the initial ' = [up to date]' from the line + message_string = line.split('date]', 1)[-1] + + # Trim whitespace + message_string = ' '.join(message_string.split()) + + self.update(0, + 1, + 1, + message_string) sub_lines = line.split('\r') failed_lines = [] |