From 851b62d73860a7cc09d3803bbfaeda1f0eb9b990 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 1 Mar 2026 10:51:48 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Prevent=20git=20log=20output=20w?= =?UTF-8?q?ith=20signature=20information?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When users have something like [log] showSignature = true in their .gitconfig files, invocations of the log or show git sub-command emit additional information about signatures. This additional output disturbs the generation of short_hash in GitVersion.zig, the additional text is copied verbatim into the string and then shown in the CSI >q output. To fix it always suppress the output of the signature information. This has no effects when the setting is disabled anyway. --- src/build/GitVersion.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/build/GitVersion.zig b/src/build/GitVersion.zig index 566fec2e9..8b368d2cd 100644 --- a/src/build/GitVersion.zig +++ b/src/build/GitVersion.zig @@ -39,7 +39,7 @@ pub fn detect(b: *std.Build) !Version { const short_hash = short_hash: { const output = b.runAllowFail( - &[_][]const u8{ "git", "-C", b.build_root.path orelse ".", "log", "--pretty=format:%h", "-n", "1" }, + &[_][]const u8{ "git", "-C", b.build_root.path orelse ".", "-c", "log.showSignature=false", "log", "--pretty=format:%h", "-n", "1" }, &code, .Ignore, ) catch |err| switch (err) {