File tree 1 file changed +4
-4
lines changed
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 {
219
219
log .Error ("updateIssuesCommit: %v" , err )
220
220
}
221
221
222
- if len (commits .Commits ) > setting .UI .FeedMaxCommitNum {
223
- commits .Commits = commits .Commits [:setting .UI .FeedMaxCommitNum ]
224
- }
225
-
226
222
oldCommitID := opts .OldCommitID
227
223
if oldCommitID == git .EmptySHA && len (commits .Commits ) > 0 {
228
224
oldCommit , err := gitRepo .GetCommit (commits .Commits [len (commits .Commits )- 1 ].Sha1 )
@@ -250,6 +246,10 @@ func pushUpdates(optsList []*repo_module.PushUpdateOptions) error {
250
246
commits .CompareURL = ""
251
247
}
252
248
249
+ if len (commits .Commits ) > setting .UI .FeedMaxCommitNum {
250
+ commits .Commits = commits .Commits [:setting .UI .FeedMaxCommitNum ]
251
+ }
252
+
253
253
notification .NotifyPushCommits (pusher , repo , opts , commits )
254
254
255
255
if err = git_model .RemoveDeletedBranchByName (repo .ID , branch ); err != nil {
You can’t perform that action at this time.
0 commit comments