1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-01-10 04:07:18 +02:00
lazygit/pkg/gui/reflog_panel.go
2022-08-06 13:49:11 +10:00

22 lines
517 B
Go

package gui
func (gui *Gui) reflogCommitsRenderToMain() error {
commit := gui.State.Contexts.ReflogCommits.GetSelected()
var task updateTask
if commit == nil {
task = NewRenderStringTask("No reflog history")
} else {
cmdObj := gui.git.Commit.ShowCmdObj(commit.Sha, gui.State.Modes.Filtering.GetPath())
task = NewRunPtyTask(cmdObj.GetCmd())
}
return gui.refreshMainViews(refreshMainOpts{
pair: gui.normalMainContextPair(),
main: &viewUpdateOpts{
title: "Reflog Entry",
task: task,
},
})
}