authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-06-15 18:57:07 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-06-15 18:57:07 -07:00
logf203efd825c26709ae1df22df4adad3d959fed76
tree5d47c2ab8aac28c30150fc49d79be297924df65c
parent38a73efa769e538e3ac89c41bb315b345a88f06d
signaturebadge-check Signed by SSH key SHA256:4hHJbtBRU58AYXwjL7fkz2fnQHdiye8x1QpTCQ0sHNw

tune getTreeDiffOnlyStat to never collapse file names


1 files changed, 2 insertions(+), 2 deletions(-)

git.zig+2-2
...@@ -269,11 +269,11 @@ pub fn getTreeDiffOnlyStat(alloc: std.mem.Allocator, dir: nfs.Dir, commitid: Com...@@ -269,11 +269,11 @@ pub fn getTreeDiffOnlyStat(alloc: std.mem.Allocator, dir: nfs.Dir, commitid: Com
269 if (parentid == null) {269 if (parentid == null) {
270 // 4b825dc642cb6eb9a060e54bf8d69288fbee4904 is a hardcode for the empty tree in git sha1270 // 4b825dc642cb6eb9a060e54bf8d69288fbee4904 is a hardcode for the empty tree in git sha1
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", "--stat", "4b825dc642cb6eb9a060e54bf8d69288fbee4904", commitid.id });272 const result = try root.child_process.run(alloc, dir, .ignore, .pipe, .ignore, 1024 * 1024 * 1024, &.{ "git", "diff-tree", "--stat=2048", "--stat-graph-width=32", "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 result.stdout;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", "--stat", parentid.?.id, commitid.id });276 const result = try root.child_process.run(alloc, dir, .ignore, .pipe, .ignore, 1024 * 1024 * 1024, &.{ "git", "diff-tree", "--stat=2048", "--stat-graph-width=32", 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 result.stdout;278 return result.stdout;
279}279}