From 254f0c3ae9417e2aa0dc4f1a16db1b7b6694f478 Mon Sep 17 00:00:00 2001 From: CJ van den Berg Date: Mon, 4 Aug 2025 09:23:52 +0200 Subject: [PATCH] fix: don't log blank lines output by git to stderr --- src/git.zig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/git.zig b/src/git.zig index 714ba86..5812a0b 100644 --- a/src/git.zig +++ b/src/git.zig @@ -168,7 +168,9 @@ pub fn status(context_: usize) Error!void { }.result, struct { fn result(_: usize, _: tp.pid_ref, output: []const u8) void { var it = std.mem.splitScalar(u8, output, '\n'); - while (it.next()) |line| std.log.err("{s}: {s}", .{ module_name, line }); + while (it.next()) |line| + if (line.len > 0) + std.log.err("{s}: {s}", .{ module_name, line }); } }.result, exit_null(tag)); }