From 39eea4a786095ddb9a9dc5fa683708246abc8d78 Mon Sep 17 00:00:00 2001 From: Niels Bauman <33722607+nielsbauman@users.noreply.github.com> Date: Sun, 24 Aug 2025 15:12:31 +0000 Subject: [PATCH] Log output of stash drop command(s) It can be useful to see the reference hash of a stash after dropping it. This makes recovering the dropped stash a lot easier if the stash was dropped accidentally. --- pkg/commands/git_commands/stash.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/commands/git_commands/stash.go b/pkg/commands/git_commands/stash.go index f6b69ae7da6..fa35fbaef16 100644 --- a/pkg/commands/git_commands/stash.go +++ b/pkg/commands/git_commands/stash.go @@ -28,14 +28,14 @@ func NewStashCommands( func (self *StashCommands) DropNewest() error { cmdArgs := NewGitCmd("stash").Arg("drop").ToArgv() - return self.cmd.New(cmdArgs).Run() + return self.cmd.New(cmdArgs).StreamOutput().Run() } func (self *StashCommands) Drop(index int) error { cmdArgs := NewGitCmd("stash").Arg("drop", fmt.Sprintf("refs/stash@{%d}", index)). ToArgv() - return self.cmd.New(cmdArgs).Run() + return self.cmd.New(cmdArgs).StreamOutput().Run() } func (self *StashCommands) Pop(index int) error {