1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-03-03 15:02:52 +02:00
lazygit/pkg/commands/commit.go

23 lines
632 B
Go
Raw Normal View History

package commands
// Commit : A git commit
type Commit struct {
Sha string
Name string
2019-03-28 18:58:34 +09:00
Status string // one of "unpushed", "pushed", "merged", "rebasing" or "selected"
DisplayString string
Action string // one of "", "pick", "edit", "squash", "reword", "drop", "fixup"
2019-02-24 13:51:52 +11:00
Copied bool // to know if this commit is ready to be cherry-picked somewhere
2019-11-18 09:38:36 +11:00
Tags []string
2020-02-25 20:11:07 +11:00
ExtraInfo string // something like 'HEAD -> master, tag: v0.15.2'
Author string
Date string
}
2020-03-26 09:18:52 +11:00
func (c *Commit) ShortSha() string {
if len(c.Sha) < 8 {
return c.Sha
}
return c.Sha[:8]
}