mirror of
https://github.com/jesseduffield/lazygit.git
synced 2024-12-12 11:15:00 +02:00
23 lines
632 B
Go
23 lines
632 B
Go
package commands
|
|
|
|
// Commit : A git commit
|
|
type Commit struct {
|
|
Sha string
|
|
Name string
|
|
Status string // one of "unpushed", "pushed", "merged", "rebasing" or "selected"
|
|
DisplayString string
|
|
Action string // one of "", "pick", "edit", "squash", "reword", "drop", "fixup"
|
|
Copied bool // to know if this commit is ready to be cherry-picked somewhere
|
|
Tags []string
|
|
ExtraInfo string // something like 'HEAD -> master, tag: v0.15.2'
|
|
Author string
|
|
Date string
|
|
}
|
|
|
|
func (c *Commit) ShortSha() string {
|
|
if len(c.Sha) < 8 {
|
|
return c.Sha
|
|
}
|
|
return c.Sha[:8]
|
|
}
|