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

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
}