Skip to content

Commit c5025b8

Browse files
committed
Removed assertion inserted in previous commit
1 parent 9543618 commit c5025b8

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

git/remote.py

-10
Original file line numberDiff line numberDiff line change
@@ -349,8 +349,6 @@ class Remote(LazyMixin, Iterable):
349349
__slots__ = ("repo", "name", "_config_reader")
350350
_id_attribute_ = "name"
351351

352-
_re_find_info = re.compile(r'\b(\S+)\s+->\s')
353-
354352
def __init__(self, repo, name):
355353
"""Initialize a remote instance
356354
@@ -515,9 +513,6 @@ def _get_fetch_info_from_stderr(self, proc, progress):
515513
# this also waits for the command to finish
516514
# Skip some progress lines that don't provide relevant information
517515
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()
521516
for line in digest_process_messages(proc.stderr, progress):
522517
if line.startswith('From') or line.startswith('remote: Total') or line.startswith('POST') \
523518
or line.startswith(' ='):
@@ -528,9 +523,6 @@ def _get_fetch_info_from_stderr(self, proc, progress):
528523
elif line.startswith('fatal:'):
529524
raise GitCommandError(("Error when fetching: %s" % line,), 2)
530525
# END handle special messages
531-
ref = self._re_find_info.search(line)
532-
if ref:
533-
seen_refs.add(ref.group(1))
534526
fetch_info_lines.append(line)
535527
# END for each line
536528

@@ -543,8 +535,6 @@ def _get_fetch_info_from_stderr(self, proc, progress):
543535
# I simply couldn't stand it anymore, so here is the quick and dirty fix ... .
544536
# This project needs a lot of work !
545537
# 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-
548538

549539
output.extend(FetchInfo._from_line(self.repo, err_line, fetch_line)
550540
for err_line, fetch_line in zip(fetch_info_lines, fetch_head_info))

0 commit comments

Comments
 (0)