Skip to content
This repository has been archived by the owner on Nov 27, 2017. It is now read-only.

Commit

Permalink
brew update: Pull from the branch linuxbrew
Browse files Browse the repository at this point in the history
Taps still pull from the branch master.
Closes #4
  • Loading branch information
sjackman committed Apr 17, 2013
1 parent a6a3baa commit e11abe7
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Library/Homebrew/cmd/update.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,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|
Expand Down Expand Up @@ -80,8 +81,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

Expand All @@ -93,7 +94,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

Expand Down

0 comments on commit e11abe7

Please sign in to comment.