| ... | ... | @@ -336,11 +336,14 @@ pub fn parseTreeDiffMeta(input: string) !TreeDiffMeta { |
| 336 | 336 | } |
| 337 | 337 | |
| 338 | 338 | std.debug.assert(std.mem.startsWith(u8, lineiter.next().?, "diff --git")); |
| 339 | | while (true) { |
| 339 | blk: while (true) { |
| 340 | 340 | while (lineiter.next()) |lin| { |
| 341 | 341 | if (std.mem.startsWith(u8, lin, "index")) break; |
| 342 | 342 | if (std.mem.startsWith(u8, lin, "new file mode")) continue; |
| 343 | 343 | if (std.mem.startsWith(u8, lin, "deleted file mode")) continue; |
| 344 | if (std.mem.startsWith(u8, lin, "old mode")) continue; |
| 345 | if (std.mem.startsWith(u8, lin, "new mode")) continue; |
| 346 | if (std.mem.startsWith(u8, lin, "diff --git")) continue :blk; |
| 344 | 347 | |
| 345 | 348 | std.log.err("{s}", .{lin}); |
| 346 | 349 | unreachable; |
| ... | ... | @@ -442,6 +445,8 @@ pub fn parseTreeDiff(alloc: std.mem.Allocator, input: string) !TreeDiff { |
| 442 | 445 | if (std.mem.startsWith(u8, lin, "index")) break; |
| 443 | 446 | if (std.mem.startsWith(u8, lin, "new file mode")) continue; |
| 444 | 447 | if (std.mem.startsWith(u8, lin, "deleted file mode")) continue; |
| 448 | if (std.mem.startsWith(u8, lin, "old mode")) continue; |
| 449 | if (std.mem.startsWith(u8, lin, "new mode")) continue; |
| 445 | 450 | |
| 446 | 451 | std.log.err("{s}", .{lin}); |
| 447 | 452 | unreachable; |