1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-11-25 22:32:13 +02:00

Fix command log for stash commands

With the exception of Rename Stash, they would all just log "Stash".
This commit is contained in:
Stefan Haller
2025-08-25 19:12:38 +02:00
parent ee81a8e3c2
commit 5cb80b8635
2 changed files with 9 additions and 3 deletions

View File

@@ -112,7 +112,7 @@ func (self *StashController) handleStashApply(stashEntry *models.StashEntry) err
Title: self.c.Tr.StashApply,
Prompt: self.c.Tr.SureApplyStashEntry,
HandleConfirm: func() error {
self.c.LogAction(self.c.Tr.Actions.Stash)
self.c.LogAction(self.c.Tr.Actions.ApplyStash)
err := self.c.Git().Stash.Apply(stashEntry.Index)
self.postStashRefresh()
if err != nil {
@@ -128,7 +128,7 @@ func (self *StashController) handleStashApply(stashEntry *models.StashEntry) err
func (self *StashController) handleStashPop(stashEntry *models.StashEntry) error {
pop := func() error {
self.c.LogAction(self.c.Tr.Actions.Stash)
self.c.LogAction(self.c.Tr.Actions.PopStash)
err := self.c.Git().Stash.Pop(stashEntry.Index)
self.postStashRefresh()
if err != nil {
@@ -160,7 +160,7 @@ func (self *StashController) handleStashDrop(stashEntries []*models.StashEntry)
Title: self.c.Tr.StashDrop,
Prompt: self.c.Tr.SureDropStashEntry,
HandleConfirm: func() error {
self.c.LogAction(self.c.Tr.Actions.Stash)
self.c.LogAction(self.c.Tr.Actions.DropStash)
for i := len(stashEntries) - 1; i >= 0; i-- {
err := self.c.Git().Stash.Drop(stashEntries[i].Index)
self.c.Refresh(types.RefreshOptions{Scope: []types.RefreshableView{types.STASH}})