Skip to content
Snippets Groups Projects

Process up to 100 commit messages for references when pushing to a new default branch

Merged Fabio Papa requested to merge fapapa/gitlab-ce:patch-issue-#56683 into master
All threads resolved!
Files
2
@@ -20,8 +20,7 @@ def commits
strong_memoize(:commits) do
if creating_default_branch?
# The most recent PROCESS_COMMIT_LIMIT commits in the default branch
offset = [count_commits_in_branch - PROCESS_COMMIT_LIMIT, 0].max
project.repository.commits(params[:newrev], offset: offset, limit: PROCESS_COMMIT_LIMIT)
project.repository.commits(params[:newrev], limit: PROCESS_COMMIT_LIMIT)
elsif creating_branch?
# Use the pushed commits that aren't reachable by the default branch
# as a heuristic. This may include more commits than are actually
Loading