@@ -349,8 +349,6 @@ class Remote(LazyMixin, Iterable):
349
349
__slots__ = ("repo" , "name" , "_config_reader" )
350
350
_id_attribute_ = "name"
351
351
352
- _re_find_info = re .compile (r'\b(\S+)\s+->\s' )
353
-
354
352
def __init__ (self , repo , name ):
355
353
"""Initialize a remote instance
356
354
@@ -515,9 +513,6 @@ def _get_fetch_info_from_stderr(self, proc, progress):
515
513
# this also waits for the command to finish
516
514
# Skip some progress lines that don't provide relevant information
517
515
fetch_info_lines = list ()
518
- # NOTE: We only keep this information for an assertion, which might as well go away.
519
- # Implementation based on https://github.com/gitpython-developers/GitPython/pull/143
520
- seen_refs = set ()
521
516
for line in digest_process_messages (proc .stderr , progress ):
522
517
if line .startswith ('From' ) or line .startswith ('remote: Total' ) or line .startswith ('POST' ) \
523
518
or line .startswith (' =' ):
@@ -528,9 +523,6 @@ def _get_fetch_info_from_stderr(self, proc, progress):
528
523
elif line .startswith ('fatal:' ):
529
524
raise GitCommandError (("Error when fetching: %s" % line ,), 2 )
530
525
# END handle special messages
531
- ref = self ._re_find_info .search (line )
532
- if ref :
533
- seen_refs .add (ref .group (1 ))
534
526
fetch_info_lines .append (line )
535
527
# END for each line
536
528
@@ -543,8 +535,6 @@ def _get_fetch_info_from_stderr(self, proc, progress):
543
535
# I simply couldn't stand it anymore, so here is the quick and dirty fix ... .
544
536
# This project needs a lot of work !
545
537
# assert len(fetch_info_lines) == len(fetch_head_info), "len(%s) != len(%s)" % (fetch_head_info, fetch_info_lines)
546
- assert len (seen_refs ) == len (fetch_head_info ), "len(%s) != len(%s)" % (fetch_head_info , seen_refs )
547
-
548
538
549
539
output .extend (FetchInfo ._from_line (self .repo , err_line , fetch_line )
550
540
for err_line , fetch_line in zip (fetch_info_lines , fetch_head_info ))
0 commit comments