From 6dfee30bf0a6faef3211eb9fd1587c4fd8e87eef Mon Sep 17 00:00:00 2001 From: Unknwon Date: Fri, 25 Sep 2015 20:35:56 -0400 Subject: #1602 Wrong commit order on issue page when pushing multiple commits --- models/update.go | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'models/update.go') diff --git a/models/update.go b/models/update.go index f381d6fd..2fd00ad7 100644 --- a/models/update.go +++ b/models/update.go @@ -23,10 +23,6 @@ type UpdateTask struct { NewCommitId string } -const ( - MAX_COMMITS int = 5 -) - func AddUpdateTask(task *UpdateTask) error { _, err := x.Insert(task) return err @@ -147,10 +143,8 @@ func Update(refName, oldCommitId, newCommitId, userName, repoUserName, repoName &base.PushCommit{commit.Id.String(), commit.Message(), commit.Author.Email, - commit.Author.Name}) - if len(commits) >= MAX_COMMITS { - break - } + commit.Author.Name, + }) } if err = CommitRepoAction(userId, ru.Id, userName, actEmail, -- cgit v1.2.3