This repository has been archived by the owner. It is now read-only.
Browse files

Only fetch master branch

  • Loading branch information...
mxcl committed Aug 29, 2012
1 parent 2396c57 commit ff9a35d980dd80f93883344a7cb278eeee5175f6
Showing with 3 additions and 3 deletions.
  1. +3 −3 install
@@ -130,12 +130,12 @@ end
ohai "Downloading and Installing Homebrew..."
Dir.chdir "/usr/local" do
if git
- # we do it in three steps to avoid fetching other branches
+ # we do it in four steps to avoid merge errors when reinstalling
system git, "init", "-q"
system git, "remote", "add", "origin", ""
- args = git, "fetch", "origin", "--depth=1"
- args.pop unless ARGV.include? "--fast"
+ args = git, "fetch", "origin", "master:refs/remotes/origin/master", "-n"
+ args << "--depth=1" if ARGV.include? "--fast"
system *args
system git, "reset", "--hard", "origin/master"

0 comments on commit ff9a35d

Please sign in to comment.