Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9b628dc

Browse files
author
Sebastian Thiel
committed
Revert "Revert "Implement update call when the object is "up to date" #871""
This reverts commit 3bf002e. Try again
1 parent 3bf002e commit 9b628dc

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

git/util.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,21 @@ def _parse_progress_line(self, line):
390390
if len(self.error_lines) > 0 or self._cur_line.startswith(('error:', 'fatal:')):
391391
self.error_lines.append(self._cur_line)
392392
return []
393+
elif 'up to date' in self._cur_line:
394+
# Checking this way instead of startswith, because debugging for
395+
# startswith(' = [up to date]') is going to be a major pain if just
396+
# a single space or bracket changes.
397+
398+
# Strip the initial ' = [up to date]' from the line
399+
message_string = line.split('date]', 1)[-1]
400+
401+
# Trim whitespace
402+
message_string = ' '.join(message_string.split())
403+
404+
self.update(0,
405+
1,
406+
1,
407+
message_string)
393408

394409
sub_lines = line.split('\r')
395410
failed_lines = []

0 commit comments

Comments
 (0)