Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
90baab7e
Commit
90baab7e
authored
Oct 17, 2017
by
Brett Walker
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
optimize branching logic
parent
cbdf372e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
app/views/projects/commit/branches.html.haml
app/views/projects/commit/branches.html.haml
+5
-6
No files found.
app/views/projects/commit/branches.html.haml
View file @
90baab7e
-
if
@branches
.
any?
||
@branches_limit_exceeded
-
if
@branches_limit_exceeded
=
commit_branch_link
(
'#'
,
_
(
'Too many branches to search'
))
-
else
-
branch
=
commit_default_branch
(
@project
,
@branches
)
=
commit_branch_link
(
project_ref_path
(
@project
,
branch
),
branch
)
-
if
@branches_limit_exceeded
=
commit_branch_link
(
'#'
,
_
(
'Too many branches to search'
))
-
elsif
@branches
.
any?
-
branch
=
commit_default_branch
(
@project
,
@branches
)
=
commit_branch_link
(
project_ref_path
(
@project
,
branch
),
branch
)
-# `commit_default_branch` deletes the default branch from `@branches`,
-# so only render this if we have more branches or tags left
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment