diff options
author | Ryooooooga <eial5q265e5@gmail.com> | 2022-03-26 22:18:08 +0900 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2022-04-02 17:04:42 +1100 |
commit | 4835fc00b861c6117c1d4d6873a05d808e54b4cf (patch) | |
tree | 6f521eb16da8c9310cab776d6b57e84de32d4752 /pkg/gui/context/local_commits_context.go | |
parent | 30be50b641dbe594d7968e79536028f22beee1b0 (diff) |
introduce Ref interface
Diffstat (limited to 'pkg/gui/context/local_commits_context.go')
-rw-r--r-- | pkg/gui/context/local_commits_context.go | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/pkg/gui/context/local_commits_context.go b/pkg/gui/context/local_commits_context.go index 0d7cc2f54..c5fcc769a 100644 --- a/pkg/gui/context/local_commits_context.go +++ b/pkg/gui/context/local_commits_context.go @@ -83,24 +83,8 @@ func (self *LocalCommitsContext) CanRebase() bool { return true } -func (self *LocalCommitsContext) GetSelectedRefName() string { - item := self.GetSelected() - - if item == nil { - return "" - } - - return item.RefName() -} - -func (self *LocalCommitsViewModel) GetSelectedDescription() string { - item := self.GetSelected() - - if item == nil { - return "" - } - - return item.Description() +func (self *LocalCommitsContext) GetSelectedRef() types.Ref { + return self.GetSelected() } func (self *LocalCommitsViewModel) SetLimitCommits(value bool) { |