1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-11-25 22:32:13 +02:00

controller for viewing sub commits

This commit is contained in:
Jesse Duffield
2022-02-06 14:37:16 +11:00
parent cd31a762b9
commit b93b8cc00a
20 changed files with 210 additions and 86 deletions

View File

@@ -84,3 +84,12 @@ func (self *BranchesViewModel) GetSelected() *models.Branch {
return self.getModel()[self.GetSelectedLineIdx()]
}
func (self *BranchesViewModel) GetSelectedRefName() string {
item := self.GetSelected()
if item == nil {
return ""
}
return item.RefName()
}