Skip to content

Commit

Permalink
CHECK-VERSIONS: Fix Git dumb references parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
lephilousophe committed Sep 11, 2022
1 parent a28d02c commit 3547fcd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion check-versions/git_checkers.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ def read_packet_line(reply):
def parse_dumb_refs(reply):
refs = list()
for line in reply.read().split(b'\n'):
if not line:
continue
obj, ref = line.split(b'\t', 1)
obj = obj.decode('ascii')
ref = ref.decode('utf-8')
Expand All @@ -45,7 +47,7 @@ def parse_dumb_refs(reply):
refsd = dict(refs)
if len(refsd) != len(refs):
raise Exception("Duplicate references in list for {0}".format(reply.geturl()))
return refs
return refsd

def parse_smart_refs(reply):
data = read_packet_line(reply)
Expand Down

0 comments on commit 3547fcd

Please sign in to comment.