Show More
@@ -58,14 +58,16 b' def _parse(data):' | |||
|
58 | 58 | prev = l |
|
59 | 59 | f, n = l.split(b'\0') |
|
60 | 60 | nl = len(n) |
|
61 |
|
|
|
62 | # modern hash, full width | |
|
63 | yield f, bin(n[:64]), n[64:] | |
|
64 |
|
|
|
65 | # legacy hash, always sha1 | |
|
66 | yield f, bin(n[:40]), n[40:] | |
|
61 | flags = n[-1:] | |
|
62 | if flags in _manifestflags: | |
|
63 | n = n[:-1] | |
|
64 | nl -= 1 | |
|
67 | 65 | else: |
|
68 |
|
|
|
66 | flags = b'' | |
|
67 | if nl not in (40, 64): | |
|
68 | raise ValueError(b'Invalid manifest line') | |
|
69 | ||
|
70 | yield f, bin(n), flags | |
|
69 | 71 | |
|
70 | 72 | |
|
71 | 73 | def _text(it): |
General Comments 0
You need to be logged in to leave comments.
Login now