summaryrefslogtreecommitdiff
path: root/git/remote.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2011-06-13 15:57:42 +0200
committerSebastian Thiel <byronimo@gmail.com>2011-06-13 15:57:42 +0200
commit59587d81412ca9da1fd06427efd864174d76c1c5 (patch)
tree2a02ddc3ea62bd7b51ca2b518533fc00653657dc /git/remote.py
parent48fab54afab49f18c260463a79b90d594c7a5833 (diff)
downloadgitpython-59587d81412ca9da1fd06427efd864174d76c1c5.tar.gz
Made remote line parsing more stable. On windows it can be that we encounter partial or intermixed lines from the pipe. This really shouldn't be, but its windows so it happens
Diffstat (limited to 'git/remote.py')
-rw-r--r--git/remote.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/git/remote.py b/git/remote.py
index 0920a7c4..a3b91113 100644
--- a/git/remote.py
+++ b/git/remote.py
@@ -49,7 +49,7 @@ def digest_process_messages(fh, progress):
if not char:
break
- if char in ('\r', '\n'):
+ if char in ('\r', '\n') and line_so_far:
dropped_lines.extend(progress._parse_progress_line(line_so_far))
line_so_far = ''
else:
@@ -510,7 +510,7 @@ class Remote(LazyMixin, Iterable):
fetch_head_info = fp.readlines()
fp.close()
- assert len(fetch_info_lines) == len(fetch_head_info)
+ assert len(fetch_info_lines) == len(fetch_head_info), "len(%s) != len(%s)" % (fetch_head_info, fetch_info_lines)
output.extend(FetchInfo._from_line(self.repo, err_line, fetch_line)
for err_line,fetch_line in zip(fetch_info_lines, fetch_head_info))