1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-04-09 07:24:03 +02:00

Increase internal sha size

This does not change the sha size that is displayed to the user

Signed-off-by: Glenn Vriesman <glenn.vriesman@gmail.com>
This commit is contained in:
Glenn Vriesman 2020-02-03 20:54:43 +01:00 committed by Jesse Duffield
parent f062e1dcda
commit 0cd91a10c6
2 changed files with 3 additions and 3 deletions

@ -64,5 +64,5 @@ func (c *Commit) GetDisplayStrings(isFocused bool) []string {
tagString = utils.ColoredString(strings.Join(c.Tags, " "), color.FgMagenta) + " " tagString = utils.ColoredString(strings.Join(c.Tags, " "), color.FgMagenta) + " "
} }
return []string{shaColor.Sprint(c.Sha), actionString + tagString + defaultColor.Sprint(c.Name)} return []string{shaColor.Sprint(c.Sha[:7]), actionString + tagString + defaultColor.Sprint(c.Name)}
} }

@ -288,8 +288,8 @@ func (c *CommitListBuilder) getLog(limit bool) string {
limitFlag = "-30" limitFlag = "-30"
} }
c.Log.Warn(fmt.Sprintf("git log --oneline %s", limitFlag)) c.Log.Warn(fmt.Sprintf("git log --oneline %s --abbrev=%d", limitFlag, 20))
result, err := c.OSCommand.RunCommandWithOutput(fmt.Sprintf("git log --oneline %s", limitFlag)) result, err := c.OSCommand.RunCommandWithOutput(fmt.Sprintf("git log --oneline %s --abbrev=%d", limitFlag, 20))
if err != nil { if err != nil {
// assume if there is an error there are no commits yet for this branch // assume if there is an error there are no commits yet for this branch
return "" return ""