mirror of
https://github.com/jesseduffield/lazygit.git
synced 2024-12-12 11:15:00 +02:00
23 lines
486 B
Go
23 lines
486 B
Go
package gui
|
|
|
|
// list panel functions
|
|
|
|
func (gui *Gui) subCommitsRenderToMain() error {
|
|
commit := gui.State.Contexts.SubCommits.GetSelected()
|
|
var task updateTask
|
|
if commit == nil {
|
|
task = NewRenderStringTask("No commits")
|
|
} else {
|
|
cmdObj := gui.git.Commit.ShowCmdObj(commit.Sha, gui.State.Modes.Filtering.GetPath())
|
|
|
|
task = NewRunPtyTask(cmdObj.GetCmd())
|
|
}
|
|
|
|
return gui.refreshMainViews(refreshMainOpts{
|
|
main: &viewUpdateOpts{
|
|
title: "Commit",
|
|
task: task,
|
|
},
|
|
})
|
|
}
|