Skip to content
This repository has been archived by the owner on Mar 12, 2019. 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 Linuxbrew/legacy-linuxbrew#4
  • Loading branch information
sjackman committed Aug 29, 2013
1 parent 82e44fc commit 4882014
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 @@ -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|
Expand Down Expand Up @@ -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

Expand All @@ -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

Expand Down

0 comments on commit 4882014

Please sign in to comment.