From 740e97e55dbbc10e7b7c5c8580db24de419f4f08 Mon Sep 17 00:00:00 2001 From: zouap Date: Tue, 22 Aug 2023 11:48:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- models/repo_activity_custom.go | 4 ---- modules/git/blame.go | 4 +++- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/models/repo_activity_custom.go b/models/repo_activity_custom.go index 26b2ea14f7..e2ddddbddd 100644 --- a/models/repo_activity_custom.go +++ b/models/repo_activity_custom.go @@ -238,12 +238,8 @@ func GetAllUserPublicRepoKPIStats(startTime time.Time, endTime time.Time) (map[s CommitLines: 0, } } - if value.Email == "1250125907@qq.com" || value.Email == "peiyongyu-34@163.com" { - log.Info("repo path=" + repository.RepoPath()) - } authors[key].Commits += value.Commits authors[key].CommitLines += value.CommitLines - } } diff --git a/modules/git/blame.go b/modules/git/blame.go index 5a9ae9a74f..3a365e6dea 100644 --- a/modules/git/blame.go +++ b/modules/git/blame.go @@ -66,7 +66,9 @@ func (r *BlameReader) NextPart() (*BlamePart, error) { } } else if line[0] == '\t' { code := line[1:] - + if blamePart == nil { + continue + } blamePart.Lines = append(blamePart.Lines, code) } } -- 2.34.1