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:
authorSean McGivern <sean@gitlab.com>2016-06-10 18:43:25 +0300
committerSean McGivern <sean@gitlab.com>2016-06-13 13:05:22 +0300
commitb9977525394ac714e31c1751690c7b993eb8d830 (patch)
treef6530492505b7a2a9c1c8fbd8c35677ab79dbc08 /app/helpers/branches_helper.rb
parent747a167a2dce3175102e4aff78504c72178cc5a5 (diff)
Only show branches for revert / cherry-pick
Tags are immutable, so we can't add a commit to either revert or cherry-pick another commit to them.
Diffstat (limited to 'app/helpers/branches_helper.rb')
-rw-r--r--app/helpers/branches_helper.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/helpers/branches_helper.rb b/app/helpers/branches_helper.rb
index e39548e17e1..3ee3fc74f0c 100644
--- a/app/helpers/branches_helper.rb
+++ b/app/helpers/branches_helper.rb
@@ -14,4 +14,8 @@ module BranchesHelper
::Gitlab::GitAccess.new(current_user, project).can_push_to_branch?(branch_name)
end
+
+ def project_branches
+ options_for_select(@project.repository.branch_names, @project.default_branch)
+ end
end