Commit 90baab7e authored by Brett Walker's avatar Brett Walker

optimize branching logic

parent cbdf372e
- if @branches.any? || @branches_limit_exceeded - if @branches_limit_exceeded
- if @branches_limit_exceeded = commit_branch_link('#', _('Too many branches to search'))
= commit_branch_link('#', _('Too many branches to search')) - elsif @branches.any?
- else - branch = commit_default_branch(@project, @branches)
- branch = commit_default_branch(@project, @branches) = commit_branch_link(project_ref_path(@project, branch), branch)
= commit_branch_link(project_ref_path(@project, branch), branch)
-# `commit_default_branch` deletes the default branch from `@branches`, -# `commit_default_branch` deletes the default branch from `@branches`,
-# so only render this if we have more branches or tags left -# so only render this if we have more branches or tags left
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment