Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Schilling <rschilling@student.tugraz.at>2018-02-09 19:46:41 +0300
committerRobert Schilling <rschilling@student.tugraz.at>2018-02-09 19:46:41 +0300
commit922d156a5e0412a12662df94e03479f7ed015f7b (patch)
treeb36694ea6070ec44bf95a1d02937cda291f87e22 /lib/api/commits.rb
parent2a970e02912a75962ce559ba49252a4696bbfbea (diff)
Separate branch and tag names
Diffstat (limited to 'lib/api/commits.rb')
-rw-r--r--lib/api/commits.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/api/commits.rb b/lib/api/commits.rb
index 6d845253c3a..afaf68114e8 100644
--- a/lib/api/commits.rb
+++ b/lib/api/commits.rb
@@ -171,12 +171,12 @@ module API
refs =
case params[:type]
when 'branches'
- user_project.repository.branch_names_contains(commit.id)
+ user_project.repository.branch_names_contains(commit.id).map {|branch_name| [branch_name, true]}
when 'tags'
- user_project.repository.tag_names_contains(commit.id)
+ user_project.repository.tag_names_contains(commit.id).map {|tag_name| [tag_name, false]}
else
- refs = user_project.repository.branch_names_contains(commit.id)
- refs.concat(user_project.repository.tag_names_contains(commit.id))
+ refs = user_project.repository.branch_names_contains(commit.id).map {|branch_name| [branch_name, true]}
+ refs.concat(user_project.repository.tag_names_contains(commit.id).map {|tag_name| [tag_name, false]})
end
present refs, with: Entities::BasicRef