mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-06-15 00:15:32 +02:00
support setting the author of a commit
update copy
This commit is contained in:
@ -10,6 +10,7 @@ import (
|
||||
"github.com/jesseduffield/lazygit/pkg/gui/types"
|
||||
"github.com/jesseduffield/lazygit/pkg/utils"
|
||||
"github.com/jesseduffield/minimal/gitignore"
|
||||
"github.com/samber/lo"
|
||||
"gopkg.in/ozeidan/fuzzy-patricia.v3/patricia"
|
||||
)
|
||||
|
||||
@ -174,6 +175,14 @@ func (self *SuggestionsHelper) GetRefsSuggestionsFunc() func(string) []*types.Su
|
||||
return FuzzySearchFunc(refNames)
|
||||
}
|
||||
|
||||
func (self *SuggestionsHelper) GetAuthorsSuggestionsFunc() func(string) []*types.Suggestion {
|
||||
authors := lo.Uniq(slices.Map(self.model.Commits, func(commit *models.Commit) string {
|
||||
return fmt.Sprintf("%s <%s>", commit.AuthorName, commit.AuthorEmail)
|
||||
}))
|
||||
|
||||
return FuzzySearchFunc(authors)
|
||||
}
|
||||
|
||||
func FuzzySearchFunc(options []string) func(string) []*types.Suggestion {
|
||||
return func(input string) []*types.Suggestion {
|
||||
var matches []string
|
||||
|
Reference in New Issue
Block a user