/
githubmirror
/
lazygit
Обзор
Документация
Войти
/
githubmirror
/
lazygit
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
pkg/commands/models/stash_entry.go
35 строк
599 B
Stefan Haller
Add hash field to models.StashEntry
25 авг 2025, 20:23
25 авг 2025, 20:23
ee81a8e
Код
Авторство
О чём код?
package models import "fmt" // StashEntry : A git stash entry type StashEntry struct { Index int Recency string Name string Hash string } func (s *StashEntry) FullRefName() string { return "refs/" + s.RefName() } func (s *StashEntry) RefName() string { return fmt.Sprintf("stash@{%d}", s.Index) } func (s *StashEntry) ShortRefName() string { return s.RefName() } 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 }