mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-28 16:02:01 +03:00
feat: add stash option to include untracked changes
This commit is contained in:
committed by
Andrew Hynes
parent
de6d278e57
commit
7ddb80a13e
@ -109,3 +109,11 @@ func (self *StashCommands) SaveStagedChanges(message string) error {
|
|||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (self *StashCommands) StashUntrackedChanges(message string) error {
|
||||||
|
if err := self.cmd.New("git stash -u").Run(); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -792,6 +792,13 @@ func (self *FilesController) createStashMenu() error {
|
|||||||
},
|
},
|
||||||
Key: 'u',
|
Key: 'u',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
Label: self.c.Tr.LcStashIncludeUntrackedChanges,
|
||||||
|
OnPress: func() error {
|
||||||
|
return self.handleStashSave(self.git.Stash.StashUntrackedChanges, self.c.Tr.Actions.StashIncludeUntrackedChanges, self.c.Tr.NoFilesToStash)
|
||||||
|
},
|
||||||
|
Key: 'U',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -293,6 +293,7 @@ type TranslationSet struct {
|
|||||||
LcStashStagedChanges string
|
LcStashStagedChanges string
|
||||||
LcStashAllChangesKeepIndex string
|
LcStashAllChangesKeepIndex string
|
||||||
LcStashUnstagedChanges string
|
LcStashUnstagedChanges string
|
||||||
|
LcStashIncludeUntrackedChanges string
|
||||||
LcStashOptions string
|
LcStashOptions string
|
||||||
NotARepository string
|
NotARepository string
|
||||||
LcJump string
|
LcJump string
|
||||||
@ -584,6 +585,7 @@ type Actions struct {
|
|||||||
StashAllChangesKeepIndex string
|
StashAllChangesKeepIndex string
|
||||||
StashStagedChanges string
|
StashStagedChanges string
|
||||||
StashUnstagedChanges string
|
StashUnstagedChanges string
|
||||||
|
StashIncludeUntrackedChanges string
|
||||||
GitFlowFinish string
|
GitFlowFinish string
|
||||||
GitFlowStart string
|
GitFlowStart string
|
||||||
CopyToClipboard string
|
CopyToClipboard string
|
||||||
@ -933,6 +935,7 @@ func EnglishTranslationSet() TranslationSet {
|
|||||||
LcStashStagedChanges: "stash staged changes",
|
LcStashStagedChanges: "stash staged changes",
|
||||||
LcStashAllChangesKeepIndex: "stash all changes and keep index",
|
LcStashAllChangesKeepIndex: "stash all changes and keep index",
|
||||||
LcStashUnstagedChanges: "stash unstaged changes",
|
LcStashUnstagedChanges: "stash unstaged changes",
|
||||||
|
LcStashIncludeUntrackedChanges: "stash all changes including untracked files",
|
||||||
LcStashOptions: "Stash options",
|
LcStashOptions: "Stash options",
|
||||||
NotARepository: "Error: must be run inside a git repository",
|
NotARepository: "Error: must be run inside a git repository",
|
||||||
LcJump: "jump to panel",
|
LcJump: "jump to panel",
|
||||||
@ -1207,6 +1210,7 @@ func EnglishTranslationSet() TranslationSet {
|
|||||||
StashAllChangesKeepIndex: "Stash all changes and keep index",
|
StashAllChangesKeepIndex: "Stash all changes and keep index",
|
||||||
StashStagedChanges: "Stash staged changes",
|
StashStagedChanges: "Stash staged changes",
|
||||||
StashUnstagedChanges: "Stash unstaged changes",
|
StashUnstagedChanges: "Stash unstaged changes",
|
||||||
|
StashIncludeUntrackedChanges: "Stash all changes including untracked files",
|
||||||
GitFlowFinish: "Git flow finish",
|
GitFlowFinish: "Git flow finish",
|
||||||
GitFlowStart: "Git Flow start",
|
GitFlowStart: "Git Flow start",
|
||||||
CopyToClipboard: "Copy to clipboard",
|
CopyToClipboard: "Copy to clipboard",
|
||||||
|
Reference in New Issue
Block a user