| ... | ... | @@ -1265,10 +1265,13 @@ pub const Repository = struct { |
| 1265 | 1265 | const content = try file.mmap(); |
| 1266 | 1266 | defer nfs.munmap(content); |
| 1267 | 1267 | var iter = std.mem.splitScalar(u8, content, '\n'); |
| 1268 | var prev_line: []const u8 = ""; |
| 1268 | 1269 | while (iter.next()) |line| { |
| 1270 | defer prev_line = line; |
| 1269 | 1271 | if (line.len == 0) break; |
| 1270 | 1272 | if (line[0] == '#') continue; |
| 1271 | 1273 | if (line[0] == '^') { |
| 1274 | if (!std.mem.startsWith(u8, prev_line[41..], "refs/" ++ kind ++ "/")) continue; |
| 1272 | 1275 | map.values()[map.count() - 1][1] = ensureObjId(CommitId, try arena.dupe(u8, line[1..])).id; |
| 1273 | 1276 | continue; |
| 1274 | 1277 | } |