mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-13 05:15:53 +02:00
more lenient getting of short shas
This commit is contained in:
parent
569ec5919c
commit
37acc17cf3
4 changed files with 12 additions and 5 deletions
|
@ -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]
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue