authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-07-11 22:12:36 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-07-11 22:12:36 -07:00
log5bcf64a7040873df380d316117420e1c432fab90
treeaec1ef9620ebbae169fd07292db8382e74a32147
parent90d3639411a06f2a665355a00fa314fe15488aac
signaturebadge-check Signed by SSH key SHA256:4hHJbtBRU58AYXwjL7fkz2fnQHdiye8x1QpTCQ0sHNw

addPackedRefs: ensure the expansion is the kind we're looking for

fix for gcc/tags/

1 files changed, 3 insertions(+), 0 deletions(-)

git.zig+3
......@@ -1265,10 +1265,13 @@ pub const Repository = struct {
12651265 const content = try file.mmap();
12661266 defer nfs.munmap(content);
12671267 var iter = std.mem.splitScalar(u8, content, '\n');
1268 var prev_line: []const u8 = "";
12681269 while (iter.next()) |line| {
1270 defer prev_line = line;
12691271 if (line.len == 0) break;
12701272 if (line[0] == '#') continue;
12711273 if (line[0] == '^') {
1274 if (!std.mem.startsWith(u8, prev_line[41..], "refs/" ++ kind ++ "/")) continue;
12721275 map.values()[map.count() - 1][1] = ensureObjId(CommitId, try arena.dupe(u8, line[1..])).id;
12731276 continue;
12741277 }