ignore wip/ branches from git

This commit is contained in:
Frédéric Péters 2015-05-07 09:35:54 +02:00
parent 5c8c4432fb
commit aef9b6d190
2 changed files with 20 additions and 0 deletions

View File

@ -4,6 +4,7 @@ require_dependency 'welcome_controller_patch'
require_dependency 'project_model_patch'
require_dependency 'mailer_patch'
require_dependency 'attachments_controller_patch'
require_dependency 'git_adapter_patch'
Redmine::Plugin.register :redmine_entrouvert do
name 'Redmine Entr\'ouvert plugin'

19
lib/git_adapter_patch.rb Normal file
View File

@ -0,0 +1,19 @@
require 'redmine/scm/adapters/git_adapter.rb'
# skip wip/ branches
module Redmine
module Scm
module Adapters
class GitAdapter
alias_method :branches_original, :branches
def branches(*args)
all_branches = branches_original(*args)
all_branches.find_all { |b| !b.start_with("wip/") }
end
end
end
end
end