log.Error("updateIssuesCommit: %v", err)
}
- if len(commits.Commits) > setting.UI.FeedMaxCommitNum {
- commits.Commits = commits.Commits[:setting.UI.FeedMaxCommitNum]
- }
-
oldCommitID := opts.OldCommitID
if oldCommitID == git.EmptySHA && len(commits.Commits) > 0 {
oldCommit, err := gitRepo.GetCommit(commits.Commits[len(commits.Commits)-1].Sha1)
commits.CompareURL = ""
}
+ if len(commits.Commits) > setting.UI.FeedMaxCommitNum {
+ commits.Commits = commits.Commits[:setting.UI.FeedMaxCommitNum]
+ }
+
notification.NotifyPushCommits(pusher, repo, opts, commits)
if err = git_model.RemoveDeletedBranchByName(repo.ID, branch); err != nil {