@@ -583,6 +583,10 @@ def fetch(self, refspec=None, progress=None, **kwargs):
583
583
See also git-push(1).
584
584
585
585
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.
586
590
:param progress: See 'push' method
587
591
:param kwargs: Additional arguments to be passed to git-fetch
588
592
:return:
@@ -593,7 +597,11 @@ def fetch(self, refspec=None, progress=None, **kwargs):
593
597
As fetch does not provide progress information to non-ttys, we cannot make
594
598
it available here unfortunately as in the 'push' method."""
595
599
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 )
597
605
return self ._get_fetch_info_from_stderr (proc , progress or RemoteProgress ())
598
606
599
607
def pull (self , refspec = None , progress = None , ** kwargs ):
0 commit comments