1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-11-29 22:48:24 +02:00

Add user config gui.commitAuthorFormat

This commit is contained in:
anikiforov
2024-05-19 16:07:27 +04:00
parent 629b7ba1b8
commit 57f9493770
5 changed files with 32 additions and 2 deletions

View File

@@ -440,9 +440,14 @@ func displayCommit(
mark = fmt.Sprintf("%s ", willBeRebased)
}
authorFunc := authors.ShortAuthor
if fullDescription {
var authorFunc func(string) string
switch common.UserConfig.Gui.CommitAuthorFormat {
case "short":
authorFunc = authors.ShortAuthor
case "full":
authorFunc = authors.LongAuthor
default:
authorFunc = lo.Ternary(fullDescription, authors.LongAuthor, authors.ShortAuthor)
}
cols := make([]string, 0, 7)