mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-31 14:24:25 +03:00
allow resetting cherry picked commits selection
This commit is contained in:
@ -128,6 +128,7 @@ Default path for the config file:
|
|||||||
tagCommit: 'T'
|
tagCommit: 'T'
|
||||||
toggleDiffCommit: 'i'
|
toggleDiffCommit: 'i'
|
||||||
checkoutCommit: '<space>'
|
checkoutCommit: '<space>'
|
||||||
|
resetCherryPick: '<c-R>'
|
||||||
stash:
|
stash:
|
||||||
popStash: 'g'
|
popStash: 'g'
|
||||||
commitFiles:
|
commitFiles:
|
||||||
|
@ -360,6 +360,7 @@ keybinding:
|
|||||||
tagCommit: 'T'
|
tagCommit: 'T'
|
||||||
toggleDiffCommit: 'i'
|
toggleDiffCommit: 'i'
|
||||||
checkoutCommit: '<space>'
|
checkoutCommit: '<space>'
|
||||||
|
resetCherryPick: '<c-R>'
|
||||||
stash:
|
stash:
|
||||||
popStash: 'g'
|
popStash: 'g'
|
||||||
commitFiles:
|
commitFiles:
|
||||||
|
@ -642,3 +642,8 @@ func (gui *Gui) handleOpenSearchForCommitsPanel(g *gocui.Gui, v *gocui.View) err
|
|||||||
|
|
||||||
return gui.handleOpenSearch(gui.g, v)
|
return gui.handleOpenSearch(gui.g, v)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (gui *Gui) handleResetCherryPick(g *gocui.Gui, v *gocui.View) error {
|
||||||
|
gui.State.CherryPickedCommits = []*commands.Commit{}
|
||||||
|
return gui.refreshCommits(gui.g)
|
||||||
|
}
|
||||||
|
@ -840,6 +840,14 @@ func (gui *Gui) GetInitialKeybindings() []*Binding {
|
|||||||
Handler: gui.handleTagCommit,
|
Handler: gui.handleTagCommit,
|
||||||
Description: gui.Tr.SLocalize("tagCommit"),
|
Description: gui.Tr.SLocalize("tagCommit"),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
ViewName: "commits",
|
||||||
|
Contexts: []string{"branch-commits"},
|
||||||
|
Key: gui.getKey("commits.resetCherryPick"),
|
||||||
|
Modifier: gocui.ModNone,
|
||||||
|
Handler: gui.handleResetCherryPick,
|
||||||
|
Description: gui.Tr.SLocalize("resetCherryPick"),
|
||||||
|
},
|
||||||
{
|
{
|
||||||
ViewName: "commits",
|
ViewName: "commits",
|
||||||
Contexts: []string{"reflog-commits"},
|
Contexts: []string{"reflog-commits"},
|
||||||
|
@ -1032,6 +1032,9 @@ func addEnglish(i18nObject *i18n.Bundle) error {
|
|||||||
}, &i18n.Message{
|
}, &i18n.Message{
|
||||||
ID: "closeMenu",
|
ID: "closeMenu",
|
||||||
Other: "close menu",
|
Other: "close menu",
|
||||||
|
}, &i18n.Message{
|
||||||
|
ID: "resetCherryPick",
|
||||||
|
Other: "reset cherry-picked (copied) commits selection",
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user