| ... | @@ -270,8 +270,7 @@ pub fn parseTree(alloc: std.mem.Allocator, treefile: string) !Tree { | ... | @@ -270,8 +270,7 @@ pub fn parseTree(alloc: std.mem.Allocator, treefile: string) !Tree { |
| 270 | var jter = std.mem.splitScalar(u8, line, ' '); | 270 | var jter = std.mem.splitScalar(u8, line, ' '); |
| 271 | const mode = jter.next().?; | 271 | const mode = jter.next().?; |
| 272 | const otype = std.meta.stringToEnum(Tree.Object.Id.Tag, jter.next().?).?; | 272 | const otype = std.meta.stringToEnum(Tree.Object.Id.Tag, jter.next().?).?; |
| 273 | const id_and_name = jter.next().?; | 273 | const id_and_name = jter.rest(); |
| 274 | std.debug.assert(jter.next() == null); | | |
| 275 | const tab_pos = std.mem.indexOfScalar(u8, id_and_name, '\t').?; // why git. why. | 274 | const tab_pos = std.mem.indexOfScalar(u8, id_and_name, '\t').?; // why git. why. |
| 276 | std.debug.assert(tab_pos == 40); | 275 | std.debug.assert(tab_pos == 40); |
| 277 | const id = id_and_name[0..tab_pos][0..40]; | 276 | const id = id_and_name[0..tab_pos][0..40]; |