Skip to content
Browse files

Fixing Merge.upstream

  • Loading branch information...
1 parent 6b54b20 commit 4570b01523d3a2aadae09763f7459aa11d11342e @winton committed May 28, 2010
Showing with 2 additions and 6 deletions.
  1. +2 −6 lib/stencil/merge.rb
View
8 lib/stencil/merge.rb
@@ -36,11 +36,10 @@ def template(path, push)
Cmd.run path, "git checkout master"
end
- def upstream(name, commit=nil, branches=[])
+ def upstream(name, commit=nil, *branches)
# Project variables
project = Config.read[:projects][name]
- branch = Cmd.run(project[:path], "git branch").split
- branch = branch[branch.index('*') + 1]
+ branches = project[:branches] if branches.empty?
# Template variables
template = Config.read[:templates][project[:template].intern]
@@ -58,9 +57,6 @@ def upstream(name, commit=nil, branches=[])
commit = Cmd.run(template[:path], cmd).strip
end
- # Cherry pick into master if no branches specified
- branches = %w(master) if branches.empty?
-
# Cherry pick commit into branches
branches.each do |branch|
output = Cmd.run path, "git checkout #{branch}"

0 comments on commit 4570b01

Please sign in to comment.
Something went wrong with that request. Please try again.