From 488201462f64eb5288611fcd3a5e97ebe09f768f Mon Sep 17 00:00:00 2001 From: Shaun Jackman Date: Mon, 8 Apr 2013 21:28:10 -0700 Subject: [PATCH] brew update: Pull from the branch linuxbrew Taps still pull from the branch master. Closes Linuxbrew/linuxbrew#4 --- Library/Homebrew/cmd/update.rb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Library/Homebrew/cmd/update.rb b/Library/Homebrew/cmd/update.rb index b3248c5cb32..bd34b69d8be 100644 --- a/Library/Homebrew/cmd/update.rb +++ b/Library/Homebrew/cmd/update.rb @@ -19,7 +19,8 @@ def update report = Report.new master_updater = Updater.new - master_updater.pull! + master_updater.pull! (if RUBY_PLATFORM =~ /linux/ + then 'linuxbrew' else 'master' end) report.merge!(master_updater.report) Dir["Library/Taps/*"].each do |tapd| @@ -71,8 +72,8 @@ def git_init_if_necessary class Updater attr_reader :initial_revision, :current_revision - def pull! - safe_system "git checkout -q master" + def pull! branch = 'master' + safe_system "git checkout -q #{branch}" @initial_revision = read_current_revision @@ -84,7 +85,7 @@ def pull! args << "-q" unless ARGV.verbose? args << "origin" # the refspec ensures that 'origin/master' gets updated - args << "refs/heads/master:refs/remotes/origin/master" + args << "refs/heads/#{branch}:refs/remotes/origin/#{branch}" safe_system "git", *args