Skip to content

Commit 9511ed9

Browse files
committed
Use a better name for the auto-stash for moving a custom patch to index
1 parent 2a7ce19 commit 9511ed9

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

pkg/commands/git_commands/patch.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package git_commands
22

33
import (
4+
"fmt"
45
"path/filepath"
56
"time"
67

@@ -218,7 +219,7 @@ func (self *PatchCommands) MovePatchToSelectedCommit(commits []*models.Commit, s
218219

219220
func (self *PatchCommands) MovePatchIntoIndex(commits []*models.Commit, commitIdx int, stash bool) error {
220221
if stash {
221-
if err := self.stash.Push(self.Tr.StashPrefix + commits[commitIdx].Hash()); err != nil {
222+
if err := self.stash.Push(fmt.Sprintf(self.Tr.AutoStashForMovingPatchToIndex, commits[commitIdx].ShortHash())); err != nil {
222223
return err
223224
}
224225
}

pkg/i18n/english.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,7 @@ type TranslationSet struct {
451451
AutoStashForUndo string
452452
AutoStashForCheckout string
453453
AutoStashForNewBranch string
454+
AutoStashForMovingPatchToIndex string
454455
Discard string
455456
DiscardChangesTitle string
456457
DiscardFileChangesTooltip string
@@ -1547,6 +1548,7 @@ func EnglishTranslationSet() *TranslationSet {
15471548
AutoStashForUndo: "Auto-stashing changes for undoing to %s",
15481549
AutoStashForCheckout: "Auto-stashing changes for checking out %s",
15491550
AutoStashForNewBranch: "Auto-stashing changes for creating new branch %s",
1551+
AutoStashForMovingPatchToIndex: "Auto-stashing changes for moving custom patch to index from %s",
15501552
Discard: "Discard",
15511553
DiscardFileChangesTooltip: "View options for discarding changes to the selected file.",
15521554
DiscardChangesTitle: "Discard changes",

0 commit comments

Comments
 (0)