Skip to content

Commit

Permalink
Fix to update parameter <target> -> pull <branch>.
Browse files Browse the repository at this point in the history
  • Loading branch information
dreamcat4 committed Apr 20, 2009
1 parent b5f2407 commit e81306e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/braid/rspec_git.rb
Expand Up @@ -9,6 +9,10 @@ def initialize(name, path, url)
@url = url
end

def msg(str)
puts "RSpec: #{str}"
end

def plugins_fetched?
submodules.all? {|s| File.directory?(s[:path]) }
end
Expand All @@ -19,8 +23,9 @@ def update(target)
repos.each do |r|
if File.exist?(r[:path])
msg "** Updating #{r[:name]}"
# target = ENV['REMOTE'] ? "#{ENV['REMOTE']} master" : ""
unless system("cd #{r[:path]} && git pull --rebase #{target}")
target = target ? target : "master"
# unless system("cd #{r[:path]} && git pull --rebase #{target}")
unless system("cd #{r[:path]} && git pull --rebase #{r[:url]} #{target}")
msg "Error updating #{r[:name]}"
exit 1
end
Expand Down

0 comments on commit e81306e

Please sign in to comment.