| ... | ... | @@ -57,6 +57,7 @@ pub fn getObject(alloc: std.mem.Allocator, dir: std.fs.Dir, obj: Id) !string { |
| 57 | 57 | .argv = &.{ "git", "cat-file", "-p", obj }, |
| 58 | 58 | .max_output_bytes = 1024 * 1024 * 1024, |
| 59 | 59 | }); |
| 60 | std.debug.assert(result.term == .Exited and result.term.Exited == 0); |
| 60 | 61 | return std.mem.trimRight(u8, result.stdout, "\n"); |
| 61 | 62 | } |
| 62 | 63 | |
| ... | ... | @@ -70,6 +71,7 @@ pub fn getObjectSize(alloc: std.mem.Allocator, dir: std.fs.Dir, obj: Id) !u64 { |
| 70 | 71 | .cwd_dir = dir, |
| 71 | 72 | .argv = &.{ "git", "cat-file", "-s", obj }, |
| 72 | 73 | }); |
| 74 | std.debug.assert(result.term == .Exited and result.term.Exited == 0); |
| 73 | 75 | return try std.fmt.parseInt(u64, std.mem.trimRight(u8, result.stdout, "\n"), 10); |
| 74 | 76 | } |
| 75 | 77 | |
| ... | ... | @@ -105,6 +107,7 @@ pub fn revList(alloc: std.mem.Allocator, dir: std.fs.Dir, comptime count: u31, f |
| 105 | 107 | sub_path, |
| 106 | 108 | }, |
| 107 | 109 | }); |
| 110 | std.debug.assert(result.term == .Exited and result.term.Exited == 0); |
| 108 | 111 | return std.mem.trimRight(u8, result.stdout, "\n"); |
| 109 | 112 | } |
| 110 | 113 | |
| ... | ... | @@ -309,6 +312,7 @@ pub fn getTreeDiff(alloc: std.mem.Allocator, dir: std.fs.Dir, commitid: CommitId |
| 309 | 312 | .argv = &.{ "git", "diff-tree", "-p", "--raw", "4b825dc642cb6eb9a060e54bf8d69288fbee4904", commitid.id }, |
| 310 | 313 | .max_output_bytes = 1024 * 1024 * 1024, |
| 311 | 314 | }); |
| 315 | std.debug.assert(result.term == .Exited and result.term.Exited == 0); |
| 312 | 316 | return std.mem.trim(u8, result.stdout, "\n"); |
| 313 | 317 | } |
| 314 | 318 | const result = try std.ChildProcess.exec(.{ |
| ... | ... | @@ -317,6 +321,7 @@ pub fn getTreeDiff(alloc: std.mem.Allocator, dir: std.fs.Dir, commitid: CommitId |
| 317 | 321 | .argv = &.{ "git", "diff-tree", "-p", "--raw", parentid.?.id, commitid.id }, |
| 318 | 322 | .max_output_bytes = 1024 * 1024 * 1024, |
| 319 | 323 | }); |
| 324 | std.debug.assert(result.term == .Exited and result.term.Exited == 0); |
| 320 | 325 | return std.mem.trim(u8, result.stdout, "\n"); |
| 321 | 326 | } |
| 322 | 327 | |