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
path: root/app/roles
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dzaporozhets@sphereconsultinginc.com>2012-09-21 12:22:53 +0400
committerDmitriy Zaporozhets <dzaporozhets@sphereconsultinginc.com>2012-09-21 12:22:53 +0400
commit4cc169d3cacea7e4325bb5632cc8878a7c3f41fe (patch)
tree23b40276b4ff28bfa85d3755c25b5f3d8885c732 /app/roles
parent49fe8fed11d5a8b73e15b507b214ea10b61524a5 (diff)
Improve commits compare. Added tags to autocomplete. Dont look for commits if from & to are empty
Diffstat (limited to 'app/roles')
-rw-r--r--app/roles/repository.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/roles/repository.rb b/app/roles/repository.rb
index a77de4ad5f0..01156ac18b7 100644
--- a/app/roles/repository.rb
+++ b/app/roles/repository.rb
@@ -79,6 +79,14 @@ module Repository
@heads ||= repo.heads
end
+ def branches_names
+ heads.map(&:name)
+ end
+
+ def ref_names
+ [branches_names + tags].flatten
+ end
+
def tree(fcommit, path = nil)
fcommit = commit if fcommit == :head
tree = fcommit.tree