1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-12-01 22:52:01 +02:00

more lenient getting of short shas

This commit is contained in:
Jesse Duffield
2020-03-26 09:18:52 +11:00
parent 569ec5919c
commit 37acc17cf3
4 changed files with 12 additions and 5 deletions

View File

@@ -74,7 +74,7 @@ func getFullDescriptionDisplayStringsForCommit(c *commands.Commit) []string {
truncatedAuthor := utils.TruncateWithEllipsis(c.Author, 17)
return []string{shaColor.Sprint(c.Sha[:8]), secondColumnString, yellow.Sprint(truncatedAuthor), tagString + defaultColor.Sprint(c.Name)}
return []string{shaColor.Sprint(c.ShortSha()), secondColumnString, yellow.Sprint(truncatedAuthor), tagString + defaultColor.Sprint(c.Name)}
}
func getDisplayStringsForCommit(c *commands.Commit) []string {
@@ -122,5 +122,5 @@ func getDisplayStringsForCommit(c *commands.Commit) []string {
tagString = utils.ColoredStringDirect(strings.Join(c.Tags, " "), tagColor) + " "
}
return []string{shaColor.Sprint(c.Sha[:8]), actionString + tagString + defaultColor.Sprint(c.Name)}
return []string{shaColor.Sprint(c.ShortSha()), actionString + tagString + defaultColor.Sprint(c.Name)}
}