@@ -583,6 +583,10 @@ def fetch(self, refspec=None, progress=None, **kwargs):
583583 See also git-push(1).
584584
585585 Taken from the git manual
586+
587+ Fetch supports multiple refspecs (as the
588+ underlying git-fetch does) - supplying a list rather than a string
589+ for 'refspec' will make use of this facility.
586590 :param progress: See 'push' method
587591 :param kwargs: Additional arguments to be passed to git-fetch
588592 :return:
@@ -593,7 +597,11 @@ def fetch(self, refspec=None, progress=None, **kwargs):
593597 As fetch does not provide progress information to non-ttys, we cannot make
594598 it available here unfortunately as in the 'push' method."""
595599 kwargs = add_progress (kwargs , self .repo .git , progress )
596- proc = self .repo .git .fetch (self , refspec , with_extended_output = True , as_process = True , v = True , ** kwargs )
600+ if isinstance (refspec , list ):
601+ args = refspec
602+ else :
603+ args = [refspec ]
604+ proc = self .repo .git .fetch (self , * args , with_extended_output = True , as_process = True , v = True , ** kwargs )
597605 return self ._get_fetch_info_from_stderr (proc , progress or RemoteProgress ())
598606
599607 def pull (self , refspec = None , progress = None , ** kwargs ):
0 commit comments