mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-05-30 16:45:44 +00:00
🐛 Prevent git log output with signature information (#11094)
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.
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user