diff --git a/types/commit.go b/types/commit.go index 30cb4523..e25f0a3a 100644 --- a/types/commit.go +++ b/types/commit.go @@ -174,7 +174,7 @@ var ( func (commit Commit) CoAuthors() []object.Signature { var coAuthors []object.Signature - + seen := make(map[string]bool) matches := coAuthorRegex.FindAllStringSubmatch(commit.Message, -1) for _, match := range matches { @@ -182,6 +182,11 @@ func (commit Commit) CoAuthors() []object.Signature { name := strings.TrimSpace(match[1]) email := strings.TrimSpace(match[2]) + if seen[email] { + continue + } + seen[email] = true + coAuthors = append(coAuthors, object.Signature{ Name: name, Email: email,