| ... | ... | @@ -271,11 +271,11 @@ pub fn getTreeDiffOnlyRaw(alloc: std.mem.Allocator, dir: nfs.Dir, commitid: Comm |
| 271 | 271 | // result of `printf | git hash-object -t tree --stdin` |
| 272 | 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 | 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 | 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 | 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 | 281 | // TODO make this inspect .git manually |
| ... | ... | @@ -288,11 +288,11 @@ pub fn getTreeDiffOnlyStat(alloc: std.mem.Allocator, dir: nfs.Dir, commitid: Com |
| 288 | 288 | // result of `printf | git hash-object -t tree --stdin` |
| 289 | 289 | const result = try root.child_process.run(alloc, dir, .ignore, .pipe, .ignore, 1024 * 1024 * 1024, &.{ "git", "diff-tree", "--stat", "4b825dc642cb6eb9a060e54bf8d69288fbee4904", commitid.id }); |
| 290 | 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 | 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 | 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 | 298 | // TODO make this inspect .git manually |
| ... | ... | @@ -305,11 +305,11 @@ pub fn getTreeDiffOnlySummary(alloc: std.mem.Allocator, dir: nfs.Dir, commitid: |
| 305 | 305 | // result of `printf | git hash-object -t tree --stdin` |
| 306 | 306 | const result = try root.child_process.run(alloc, dir, .ignore, .pipe, .ignore, 1024 * 1024 * 1024, &.{ "git", "diff-tree", "--summary", "4b825dc642cb6eb9a060e54bf8d69288fbee4904", commitid.id }); |
| 307 | 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 | 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 | 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 | 315 | // TODO make this inspect .git manually |
| ... | ... | @@ -323,12 +323,12 @@ pub fn getTreeDiffOnlyDiff(alloc: std.mem.Allocator, dir: nfs.Dir, commitid: Com |
| 323 | 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 | 324 | if (!(result.term == .exited and result.term.exited == 0)) std.log.err("{s}", .{result.stderr}); |
| 325 | 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 | 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 | 329 | if (!(result.term == .exited and result.term.exited == 0)) std.log.err("{s}", .{result.stderr}); |
| 330 | 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 | 334 | // TODO make this inspect .git manually |
| ... | ... | @@ -340,12 +340,12 @@ pub fn getFormatPatch(alloc: std.mem.Allocator, dir: nfs.Dir, commitid: CommitId |
| 340 | 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 | 341 | if (!(result.term == .exited and result.term.exited == 0)) std.log.err("{s}", .{result.stderr}); |
| 342 | 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 | 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 | 346 | if (!(result.term == .exited and result.term.exited == 0)) std.log.err("{s}", .{result.stderr}); |
| 347 | 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 | 351 | // TODO make this inspect .git manually |