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

22 lines
345 B
Go
Raw Normal View History

package commands
import "fmt"
// StashEntry : A git stash entry
type StashEntry struct {
2020-03-27 13:53:50 +02:00
Index int
Name string
}
func (s *StashEntry) RefName() string {
return fmt.Sprintf("stash@{%d}", s.Index)
}
func (s *StashEntry) ID() string {
return s.RefName()
}
func (s *StashEntry) Description() string {
return s.RefName() + ": " + s.Name
}