summaryrefslogtreecommitdiff
path: root/git/remote.py
diff options
context:
space:
mode:
Diffstat (limited to 'git/remote.py')
-rw-r--r--git/remote.py22
1 files changed, 17 insertions, 5 deletions
diff --git a/git/remote.py b/git/remote.py
index f89e9d83..b06c0686 100644
--- a/git/remote.py
+++ b/git/remote.py
@@ -513,14 +513,15 @@ class Remote(LazyMixin, Iterable):
def _get_fetch_info_from_stderr(self, proc, progress):
# skip first line as it is some remote info we are not interested in
output = IterableList('name')
-
-
+
+
# lines which are no progress are fetch info lines
# this also waits for the command to finish
# Skip some progress lines that don't provide relevant information
fetch_info_lines = list()
for line in digest_process_messages(proc.stderr, progress):
- if line.startswith('From') or line.startswith('remote: Total') or line.startswith('POST'):
+ if line.startswith('From') or line.startswith('remote: Total') or line.startswith('POST') \
+ or line.startswith(' ='):
continue
elif line.startswith('warning:'):
print >> sys.stderr, line
@@ -536,7 +537,10 @@ class Remote(LazyMixin, Iterable):
fetch_head_info = fp.readlines()
fp.close()
- assert len(fetch_info_lines) == len(fetch_head_info), "len(%s) != len(%s)" % (fetch_head_info, fetch_info_lines)
+ # NOTE: HACK Just disabling this line will make github repositories work much better.
+ # I simply couldn't stand it anymore, so here is the quick and dirty fix ... .
+ # This project needs a lot of work !
+ # 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))
@@ -579,6 +583,10 @@ class Remote(LazyMixin, Iterable):
See also git-push(1).
Taken from the git manual
+
+ Fetch supports multiple refspecs (as the
+ underlying git-fetch does) - supplying a list rather than a string
+ for 'refspec' will make use of this facility.
:param progress: See 'push' method
:param kwargs: Additional arguments to be passed to git-fetch
:return:
@@ -589,7 +597,11 @@ class Remote(LazyMixin, Iterable):
As fetch does not provide progress information to non-ttys, we cannot make
it available here unfortunately as in the 'push' method."""
kwargs = add_progress(kwargs, self.repo.git, progress)
- proc = self.repo.git.fetch(self, refspec, with_extended_output=True, as_process=True, v=True, **kwargs)
+ if isinstance(refspec, list):
+ args = refspec
+ else:
+ args = [refspec]
+ proc = self.repo.git.fetch(self, *args, with_extended_output=True, as_process=True, v=True, **kwargs)
return self._get_fetch_info_from_stderr(proc, progress or RemoteProgress())
def pull(self, refspec=None, progress=None, **kwargs):