summaryrefslogtreecommitdiffstats
path: root/pkg/commands/models/stash_entry.go
blob: efda6bc774d6f755bded178f36972683b303975f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package models

import "fmt"

// StashEntry : A git stash entry
type StashEntry struct {
	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
}