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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
3c8c9129
Commit
3c8c9129
authored
Jun 08, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pulls back tags if any exist
parent
ed0f26c2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
app/controllers/projects_controller.rb
app/controllers/projects_controller.rb
+6
-2
No files found.
app/controllers/projects_controller.rb
View file @
3c8c9129
...
...
@@ -253,15 +253,19 @@ class ProjectsController < Projects::ApplicationController
def
refs
repository
=
@project
.
repository
tags
=
VersionSorter
.
rsort
(
repository
.
tag_names
)
options
=
{
'Branches'
=>
repository
.
branch_names
,
'Tags'
=>
VersionSorter
.
rsort
(
repository
.
tag_names
)
}
if
tags
.
any?
options
[
'Tags'
]
=
tags
end
# If reference is commit id - we should add it to branch/tag selectbox
if
@ref
&&
!
options
.
flatten
.
include?
(
@ref
)
&&
@ref
=~
/\A[0-9a-zA-Z]{6,52}\z/
options
<<
{
'Commits'
=>
@ref
}
options
[
'Commits'
]
=
@ref
end
render
json:
options
.
to_json
...
...
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