From f203efd825c26709ae1df22df4adad3d959fed76 Mon Sep 17 00:00:00 2001 From: Meghan Denny Date: Mon, 15 Jun 2026 18:57:07 -0700 Subject: [PATCH] tune getTreeDiffOnlyStat to never collapse file names --- git.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/git.zig b/git.zig index 1a2d78a40b26c1e81ad61040d79b858a950cfcd5..9d3e461570ff4835db3ade9b31fd528824ff6266 100644 --- a/git.zig +++ b/git.zig @@ -269,11 +269,11 @@ pub fn getTreeDiffOnlyStat(alloc: std.mem.Allocator, dir: nfs.Dir, commitid: Com if (parentid == null) { // 4b825dc642cb6eb9a060e54bf8d69288fbee4904 is a hardcode for the empty tree in git sha1 // result of `printf | git hash-object -t tree --stdin` - const result = try root.child_process.run(alloc, dir, .ignore, .pipe, .ignore, 1024 * 1024 * 1024, &.{ "git", "diff-tree", "--stat", "4b825dc642cb6eb9a060e54bf8d69288fbee4904", commitid.id }); + 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 }); std.debug.assert(result.term == .exited and result.term.exited == 0); return result.stdout; } - const result = try root.child_process.run(alloc, dir, .ignore, .pipe, .ignore, 1024 * 1024 * 1024, &.{ "git", "diff-tree", "--stat", parentid.?.id, commitid.id }); + 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 }); std.debug.assert(result.term == .exited and result.term.exited == 0); return result.stdout; } -- 2.54.0