diff --git a/modules/git/repo_commit.go b/modules/git/repo_commit.go index 45745c808868..c9a5efb24ef8 100644 --- a/modules/git/repo_commit.go +++ b/modules/git/repo_commit.go @@ -504,10 +504,6 @@ func (repo *Repository) getBranches(commit *Commit, limit int) ([]string, error) // GetCommitsFromIDs get commits from commit IDs func (repo *Repository) GetCommitsFromIDs(commitIDs []string) (commits *list.List) { - if len(commitIDs) == 0 { - return nil - } - commits = list.New() for _, commitID := range commitIDs {