diff --git a/git/remote.py b/git/remote.py index 8b00ba0af..d41801346 100644 --- a/git/remote.py +++ b/git/remote.py @@ -705,8 +705,12 @@ def _get_fetch_info_from_stderr(self, proc, progress): # end truncate correct list # end sanity check + sanitization - output.extend(FetchInfo._from_line(self.repo, err_line, fetch_line) - for err_line, fetch_line in zip(fetch_info_lines, fetch_head_info)) + for err_line, fetch_line in zip(fetch_info_lines, fetch_head_info): + try: + output.append(FetchInfo._from_line(self.repo, err_line, fetch_line)) + except ValueError as exc: + log.debug("Caught error while parsing line: %s", exc) + log.warning("Git informed while fetching: %s", err_line.strip()) return output def _get_push_info(self, proc, progress):