mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-06-17 00:18:05 +02:00
more lenient getting of short shas
This commit is contained in:
@ -13,3 +13,10 @@ type Commit struct {
|
||||
Author string
|
||||
Date string
|
||||
}
|
||||
|
||||
func (c *Commit) ShortSha() string {
|
||||
if len(c.Sha) < 8 {
|
||||
return c.Sha
|
||||
}
|
||||
return c.Sha[:8]
|
||||
}
|
||||
|
Reference in New Issue
Block a user