| ... | @@ -271,11 +271,11 @@ pub fn getTreeDiffOnlyRaw(alloc: std.mem.Allocator, dir: nfs.Dir, commitid: Comm | ... | @@ -271,11 +271,11 @@ pub fn getTreeDiffOnlyRaw(alloc: std.mem.Allocator, dir: nfs.Dir, commitid: Comm |
| 271 | // result of `printf | git hash-object -t tree --stdin` | 271 | // result of `printf | git hash-object -t tree --stdin` |
| 272 | const result = try root.child_process.run(alloc, dir, .ignore, .pipe, .ignore, 1024 * 1024 * 1024, &.{ "git", "diff-tree", "--raw", "-r", "4b825dc642cb6eb9a060e54bf8d69288fbee4904", commitid.id }); | 272 | const result = try root.child_process.run(alloc, dir, .ignore, .pipe, .ignore, 1024 * 1024 * 1024, &.{ "git", "diff-tree", "--raw", "-r", "4b825dc642cb6eb9a060e54bf8d69288fbee4904", commitid.id }); |
| 273 | std.debug.assert(result.term == .exited and result.term.exited == 0); | 273 | std.debug.assert(result.term == .exited and result.term.exited == 0); |
| 274 | return std.mem.trim(u8, result.stdout, "\n"); | 274 | return result.stdout; |
| 275 | } | 275 | } |
| 276 | const result = try root.child_process.run(alloc, dir, .ignore, .pipe, .ignore, 1024 * 1024 * 1024, &.{ "git", "diff-tree", "--raw", "-r", parentid.?.id, commitid.id }); | 276 | const result = try root.child_process.run(alloc, dir, .ignore, .pipe, .ignore, 1024 * 1024 * 1024, &.{ "git", "diff-tree", "--raw", "-r", parentid.?.id, commitid.id }); |
| 277 | std.debug.assert(result.term == .exited and result.term.exited == 0); | 277 | std.debug.assert(result.term == .exited and result.term.exited == 0); |
| 278 | return std.mem.trim(u8, result.stdout, "\n"); | 278 | return result.stdout; |
| 279 | } | 279 | } |
| 280 | | 280 | |
| 281 | // TODO make this inspect .git manually | 281 | // TODO make this inspect .git manually |
| ... | @@ -288,11 +288,11 @@ pub fn getTreeDiffOnlyStat(alloc: std.mem.Allocator, dir: nfs.Dir, commitid: Com | ... | @@ -288,11 +288,11 @@ pub fn getTreeDiffOnlyStat(alloc: std.mem.Allocator, dir: nfs.Dir, commitid: Com |
| 288 | // result of `printf | git hash-object -t tree --stdin` | 288 | // result of `printf | git hash-object -t tree --stdin` |
| 289 | const result = try root.child_process.run(alloc, dir, .ignore, .pipe, .ignore, 1024 * 1024 * 1024, &.{ "git", "diff-tree", "--stat", "4b825dc642cb6eb9a060e54bf8d69288fbee4904", commitid.id }); | 289 | const result = try root.child_process.run(alloc, dir, .ignore, .pipe, .ignore, 1024 * 1024 * 1024, &.{ "git", "diff-tree", "--stat", "4b825dc642cb6eb9a060e54bf8d69288fbee4904", commitid.id }); |
| 290 | std.debug.assert(result.term == .exited and result.term.exited == 0); | 290 | std.debug.assert(result.term == .exited and result.term.exited == 0); |
| 291 | return std.mem.trim(u8, result.stdout, "\n"); | 291 | return result.stdout; |
| 292 | } | 292 | } |
| 293 | const result = try root.child_process.run(alloc, dir, .ignore, .pipe, .ignore, 1024 * 1024 * 1024, &.{ "git", "diff-tree", "--stat", parentid.?.id, commitid.id }); | 293 | const result = try root.child_process.run(alloc, dir, .ignore, .pipe, .ignore, 1024 * 1024 * 1024, &.{ "git", "diff-tree", "--stat", parentid.?.id, commitid.id }); |
| 294 | std.debug.assert(result.term == .exited and result.term.exited == 0); | 294 | std.debug.assert(result.term == .exited and result.term.exited == 0); |
| 295 | return std.mem.trim(u8, result.stdout, "\n"); | 295 | return result.stdout; |
| 296 | } | 296 | } |
| 297 | | 297 | |
| 298 | // TODO make this inspect .git manually | 298 | // TODO make this inspect .git manually |
| ... | @@ -305,11 +305,11 @@ pub fn getTreeDiffOnlySummary(alloc: std.mem.Allocator, dir: nfs.Dir, commitid: | ... | @@ -305,11 +305,11 @@ pub fn getTreeDiffOnlySummary(alloc: std.mem.Allocator, dir: nfs.Dir, commitid: |
| 305 | // result of `printf | git hash-object -t tree --stdin` | 305 | // result of `printf | git hash-object -t tree --stdin` |
| 306 | const result = try root.child_process.run(alloc, dir, .ignore, .pipe, .ignore, 1024 * 1024 * 1024, &.{ "git", "diff-tree", "--summary", "4b825dc642cb6eb9a060e54bf8d69288fbee4904", commitid.id }); | 306 | const result = try root.child_process.run(alloc, dir, .ignore, .pipe, .ignore, 1024 * 1024 * 1024, &.{ "git", "diff-tree", "--summary", "4b825dc642cb6eb9a060e54bf8d69288fbee4904", commitid.id }); |
| 307 | std.debug.assert(result.term == .exited and result.term.exited == 0); | 307 | std.debug.assert(result.term == .exited and result.term.exited == 0); |
| 308 | return std.mem.trim(u8, result.stdout, "\n"); | 308 | return result.stdout; |
| 309 | } | 309 | } |
| 310 | const result = try root.child_process.run(alloc, dir, .ignore, .pipe, .ignore, 1024 * 1024 * 1024, &.{ "git", "diff-tree", "--summary", parentid.?.id, commitid.id }); | 310 | const result = try root.child_process.run(alloc, dir, .ignore, .pipe, .ignore, 1024 * 1024 * 1024, &.{ "git", "diff-tree", "--summary", parentid.?.id, commitid.id }); |
| 311 | std.debug.assert(result.term == .exited and result.term.exited == 0); | 311 | std.debug.assert(result.term == .exited and result.term.exited == 0); |
| 312 | return std.mem.trim(u8, result.stdout, "\n"); | 312 | return result.stdout; |
| 313 | } | 313 | } |
| 314 | | 314 | |
| 315 | // TODO make this inspect .git manually | 315 | // TODO make this inspect .git manually |
| ... | @@ -323,12 +323,12 @@ pub fn getTreeDiffOnlyDiff(alloc: std.mem.Allocator, dir: nfs.Dir, commitid: Com | ... | @@ -323,12 +323,12 @@ pub fn getTreeDiffOnlyDiff(alloc: std.mem.Allocator, dir: nfs.Dir, commitid: Com |
| 323 | const result = try root.child_process.run(alloc, dir, .ignore, .pipe, .ignore, 1024 * 1024 * 1024, &.{ "git", "diff-tree", "--patch", "--full-index", "--patience", "4b825dc642cb6eb9a060e54bf8d69288fbee4904", commitid.id }); | 323 | const result = try root.child_process.run(alloc, dir, .ignore, .pipe, .ignore, 1024 * 1024 * 1024, &.{ "git", "diff-tree", "--patch", "--full-index", "--patience", "4b825dc642cb6eb9a060e54bf8d69288fbee4904", commitid.id }); |
| 324 | if (!(result.term == .exited and result.term.exited == 0)) std.log.err("{s}", .{result.stderr}); | 324 | if (!(result.term == .exited and result.term.exited == 0)) std.log.err("{s}", .{result.stderr}); |
| 325 | std.debug.assert(result.term == .exited and result.term.exited == 0); | 325 | std.debug.assert(result.term == .exited and result.term.exited == 0); |
| 326 | return std.mem.trim(u8, result.stdout, "\n"); | 326 | return result.stdout; |
| 327 | } | 327 | } |
| 328 | const result = try root.child_process.run(alloc, dir, .ignore, .pipe, .ignore, 1024 * 1024 * 1024, &.{ "git", "diff-tree", "--patch", "--full-index", "--patience", parentid.?.id, commitid.id }); | 328 | const result = try root.child_process.run(alloc, dir, .ignore, .pipe, .ignore, 1024 * 1024 * 1024, &.{ "git", "diff-tree", "--patch", "--full-index", "--patience", parentid.?.id, commitid.id }); |
| 329 | if (!(result.term == .exited and result.term.exited == 0)) std.log.err("{s}", .{result.stderr}); | 329 | if (!(result.term == .exited and result.term.exited == 0)) std.log.err("{s}", .{result.stderr}); |
| 330 | std.debug.assert(result.term == .exited and result.term.exited == 0); | 330 | std.debug.assert(result.term == .exited and result.term.exited == 0); |
| 331 | return std.mem.trim(u8, result.stdout, "\n"); | 331 | return result.stdout; |
| 332 | } | 332 | } |
| 333 | | 333 | |
| 334 | // TODO make this inspect .git manually | 334 | // TODO make this inspect .git manually |
| ... | @@ -340,12 +340,12 @@ pub fn getFormatPatch(alloc: std.mem.Allocator, dir: nfs.Dir, commitid: CommitId | ... | @@ -340,12 +340,12 @@ pub fn getFormatPatch(alloc: std.mem.Allocator, dir: nfs.Dir, commitid: CommitId |
| 340 | const result = try root.child_process.run(alloc, dir, .ignore, .pipe, .pipe, 1024 * 1024 * 1024, &.{ "git", "format-patch", "--stdout", "--full-index", "--patience", "--root", commitid.id }); | 340 | const result = try root.child_process.run(alloc, dir, .ignore, .pipe, .pipe, 1024 * 1024 * 1024, &.{ "git", "format-patch", "--stdout", "--full-index", "--patience", "--root", commitid.id }); |
| 341 | if (!(result.term == .exited and result.term.exited == 0)) std.log.err("{s}", .{result.stderr}); | 341 | if (!(result.term == .exited and result.term.exited == 0)) std.log.err("{s}", .{result.stderr}); |
| 342 | std.debug.assert(result.term == .exited and result.term.exited == 0); | 342 | std.debug.assert(result.term == .exited and result.term.exited == 0); |
| 343 | return std.mem.trim(u8, result.stdout, "\n"); | 343 | return result.stdout; |
| 344 | } | 344 | } |
| 345 | const result = try root.child_process.run(alloc, dir, .ignore, .pipe, .pipe, 1024 * 1024 * 1024, &.{ "git", "format-patch", "--stdout", "--full-index", "--patience", parentid.?.id ++ "..." ++ commitid.id }); | 345 | const result = try root.child_process.run(alloc, dir, .ignore, .pipe, .pipe, 1024 * 1024 * 1024, &.{ "git", "format-patch", "--stdout", "--full-index", "--patience", parentid.?.id ++ "..." ++ commitid.id }); |
| 346 | if (!(result.term == .exited and result.term.exited == 0)) std.log.err("{s}", .{result.stderr}); | 346 | if (!(result.term == .exited and result.term.exited == 0)) std.log.err("{s}", .{result.stderr}); |
| 347 | std.debug.assert(result.term == .exited and result.term.exited == 0); | 347 | std.debug.assert(result.term == .exited and result.term.exited == 0); |
| 348 | return std.mem.trim(u8, result.stdout, "\n"); | 348 | return result.stdout; |
| 349 | } | 349 | } |
| 350 | | 350 | |
| 351 | // TODO make this inspect .git manually | 351 | // TODO make this inspect .git manually |