From aa3da6a20fe2f191dbd87d62b54ef951302ab12a Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Sun, 11 Oct 2026 10:05:05 +0200 Subject: [PATCH] Keep the diff renderer probe out of the command log If a diff renderer is configured, its command shows up in the command log once after startup, although the user didn't do anything. This is the probe that asks the renderer whether it emits OSC 1717 metadata. It changes nothing, so like other read-only commands it shouldn't be logged. --- pkg/commands/git_commands/diff.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/commands/git_commands/diff.go b/pkg/commands/git_commands/diff.go index 910db7600..471af511d 100644 --- a/pkg/commands/git_commands/diff.go +++ b/pkg/commands/git_commands/diff.go @@ -124,7 +124,7 @@ func (self *DiffCommands) probeFiles() (string, string, func(), bool) { } func (self *DiffCommands) probeEmitsMetadata(cmdObj *oscommands.CmdObj) bool { - cmdObj.AddEnvVars("OSC1717=V1") + cmdObj.AddEnvVars("OSC1717=V1").DontLog() // A renderer may well object to being handed nothing to render. We want to know // whatever it said before objecting, and that is captured either way. output, _ := cmdObj.RunWithOutput()