1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2024-12-14 11:23:09 +02:00
lazygit/pkg/commands/models/stash_entry.go
2023-12-27 11:21:49 +01:00

31 lines
505 B
Go

package models
import "fmt"
// StashEntry : A git stash entry
type StashEntry struct {
Index int
Recency string
Name string
}
func (s *StashEntry) FullRefName() string {
return s.RefName()
}
func (s *StashEntry) RefName() string {
return fmt.Sprintf("stash@{%d}", s.Index)
}
func (s *StashEntry) ParentRefName() string {
return s.RefName() + "^"
}
func (s *StashEntry) ID() string {
return s.RefName()
}
func (s *StashEntry) Description() string {
return s.RefName() + ": " + s.Name
}