| author | |
| committer | |
| log | e5f2387fe6d71d4c0a965348125e9e612680decd |
| tree | 2c4642fe2eb8dbb16ce1abb29aa21637b89e604e |
| parent | 1616ae24d16ae69d9c9fc08b29248ee5a042721c |
| signature |
3 files changed, 18 insertions(+), 1 deletions(-)
git.zig+6-1| ... | ... | @@ -245,7 +245,12 @@ fn parseCommitUserAndAt(input: string) !UserAndAt { |
| 245 | 245 | var maybe_bad_parser = std.mem.splitBackwardsScalar(u8, input, ' '); |
| 246 | 246 | const tz_part = maybe_bad_parser.next() orelse return error.BadCommitTz; |
| 247 | 247 | const time_part = maybe_bad_parser.next() orelse return error.BadCommitTime; |
| 248 | const email_part = maybe_bad_parser.next() orelse return error.BadCommitEmail; | |
| 248 | var email_part = maybe_bad_parser.next() orelse return error.BadCommitEmail; | |
| 249 | while (email_part[0] != '<') { | |
| 250 | const next_len = maybe_bad_parser.next().?.len; | |
| 251 | email_part.ptr -= next_len + 1; | |
| 252 | email_part.len += next_len + 1; | |
| 253 | } | |
| 249 | 254 | const name_part = maybe_bad_parser.rest(); |
| 250 | 255 | std.debug.assert(email_part[0] == '<'); |
| 251 | 256 | std.debug.assert(email_part[email_part.len - 1] == '>'); |
test.zig+6| ... | ... | @@ -238,6 +238,12 @@ test { |
| 238 | 238 | const alloc = arena.allocator(); |
| 239 | 239 | _ = try git.parseTreeDiff(alloc, @embedFile("./testdata/diff-d9165aacce3629d503f87cd2c3f612629127641b")); // zig |
| 240 | 240 | } |
| 241 | test { | |
| 242 | var arena = std.heap.ArenaAllocator.init(std.testing.allocator); | |
| 243 | defer arena.deinit(); | |
| 244 | const alloc = arena.allocator(); | |
| 245 | _ = try git.parseCommit(alloc, @embedFile("./testdata/commit-afdc41cfd61db23f545d9239b61695e2ae991713")); // zig | |
| 246 | } | |
| 241 | 247 | test { |
| 242 | 248 | var arena = std.heap.ArenaAllocator.init(std.testing.allocator); |
| 243 | 249 | defer arena.deinit(); |
testdata/commit-afdc41cfd61db23f545d9239b61695e2ae991713 created+6| ... | ... | @@ -0,0 +1,6 @@ |
| 1 | tree 75fb7a2a91977f415947e341c052db72ecb269a8 | |
| 2 | parent b5cef9e8b48e81fb1f3b56cb752bac95e6a2d44b | |
| 3 | author Michael Ortmann <keine email> 1710995836 +0100 | |
| 4 | committer Veikka Tuominen <git@vexu.eu> 1711033730 +0200 | |
| 5 | ||
| 6 | std.os.windows: add POLL.IN and POLL.OUT |