|
35 | 35 | # Tightly coupled to the format emitted by azldev's render pipeline; if azldev |
36 | 36 | # ever changes the emitted form (email suffix, version tag, different |
37 | 37 | # whitespace) this regex must be updated or every spec will look like drift. |
38 | | -# Owner: azure-linux-dev-tools (cmd that emits "* <date> azldev <>" lines). |
39 | | -# e.g. "* Wed Apr 08 2026 azldev <> - 1.0-1" |
| 38 | +# Owner: azure-linux-dev-tools (cmd that emits "* <date> azldev <user@example.com>" lines). |
| 39 | +# e.g. "* Wed Apr 08 2026 azldev <azurelinux@microsoft.com> - 1.0-1" |
40 | 40 | _CHANGELOG_DATE_RE = re.compile( |
41 | 41 | r"^\* [A-Z][a-z]{2} [A-Z][a-z]{2} [0-9]{2} [0-9]{4} azldev\b" |
42 | 42 | ) |
@@ -68,21 +68,21 @@ def _resolve_head_blobs(paths: list[str]) -> dict[str, str]: |
68 | 68 | """ |
69 | 69 | if not paths: |
70 | 70 | return {} |
71 | | - raw = _git_bytes("ls-tree", "-z", "HEAD", "--", *paths) |
| 71 | + raw = _git_bytes("ls-tree", "-z", "HEAD", "--", *paths).decode("utf-8") |
72 | 72 | out: dict[str, str] = {p: "" for p in paths} |
73 | | - for entry in raw.split(b"\x00"): |
| 73 | + for entry in raw.split("\0"): |
74 | 74 | if not entry: |
75 | 75 | continue |
76 | 76 | # Format: "<mode> <type> <sha>\t<path>" |
77 | | - meta, _, path_b = entry.partition(b"\t") |
| 77 | + meta, _, path = entry.partition("\t") |
78 | 78 | try: |
79 | | - _mode, kind, sha = meta.split(b" ") |
| 79 | + _mode, kind, sha = meta.split(" ") |
80 | 80 | except ValueError: |
81 | 81 | continue |
82 | | - if kind != b"blob": |
| 82 | + if kind != "blob": |
83 | 83 | # Submodule (commit) or tree — not a regular file we can diff. |
84 | 84 | continue |
85 | | - out[path_b.decode("utf-8")] = sha.decode("ascii") |
| 85 | + out[path] = sha |
86 | 86 | return out |
87 | 87 |
|
88 | 88 |
|
|
0 commit comments