diff options
author | Robert Schilling <rschilling@student.tugraz.at> | 2018-02-09 19:46:41 +0300 |
---|---|---|
committer | Robert Schilling <rschilling@student.tugraz.at> | 2018-02-09 19:46:41 +0300 |
commit | 922d156a5e0412a12662df94e03479f7ed015f7b (patch) | |
tree | b36694ea6070ec44bf95a1d02937cda291f87e22 /lib/api/commits.rb | |
parent | 2a970e02912a75962ce559ba49252a4696bbfbea (diff) |
Separate branch and tag names
Diffstat (limited to 'lib/api/commits.rb')
-rw-r--r-- | lib/api/commits.rb | 8 |
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 |