File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -219,10 +219,6 @@ func pushUpdates(optsList []*repo_module.PushUpdateOptions) error {
219219 log .Error ("updateIssuesCommit: %v" , err )
220220 }
221221
222- if len (commits .Commits ) > setting .UI .FeedMaxCommitNum {
223- commits .Commits = commits .Commits [:setting .UI .FeedMaxCommitNum ]
224- }
225-
226222 oldCommitID := opts .OldCommitID
227223 if oldCommitID == git .EmptySHA && len (commits .Commits ) > 0 {
228224 oldCommit , err := gitRepo .GetCommit (commits .Commits [len (commits .Commits )- 1 ].Sha1 )
@@ -250,6 +246,10 @@ func pushUpdates(optsList []*repo_module.PushUpdateOptions) error {
250246 commits .CompareURL = ""
251247 }
252248
249+ if len (commits .Commits ) > setting .UI .FeedMaxCommitNum {
250+ commits .Commits = commits .Commits [:setting .UI .FeedMaxCommitNum ]
251+ }
252+
253253 notification .NotifyPushCommits (pusher , repo , opts , commits )
254254
255255 if err = git_model .RemoveDeletedBranchByName (repo .ID , branch ); err != nil {
You can’t perform that action at this time.
0 commit comments