]> source.dussan.org Git - gitea.git/commitdiff
support gitmailmap in GetCodeActivityStats() (#15009)
authora1012112796 <1012112796@qq.com>
Wed, 17 Mar 2021 21:00:26 +0000 (05:00 +0800)
committerGitHub <noreply@github.com>
Wed, 17 Mar 2021 21:00:26 +0000 (17:00 -0400)
ref:
- https://git-scm.com/docs/gitmailmap
- https://git-scm.com/docs/git-log#Documentation/git-log.txt-emaNem

Signed-off-by: a1012112796 <1012112796@qq.com>
Co-authored-by: zeripath <art27@cantab.net>
modules/git/repo_stats.go

index 59b8177401ccae23e79e7084f99e767d28cb93df..cb2a2bcf51027ea9d2cb151992b308448c6600a4 100644 (file)
@@ -59,7 +59,7 @@ func (repo *Repository) GetCodeActivityStats(fromTime time.Time, branch string)
                _ = stdoutWriter.Close()
        }()
 
-       args := []string{"log", "--numstat", "--no-merges", "--pretty=format:---%n%h%n%an%n%ae%n", "--date=iso", fmt.Sprintf("--since='%s'", since)}
+       args := []string{"log", "--numstat", "--no-merges", "--pretty=format:---%n%h%n%aN%n%aE%n", "--date=iso", fmt.Sprintf("--since='%s'", since)}
        if len(branch) == 0 {
                args = append(args, "--branches=*")
        } else {