Skip to content
This repository
Browse code

Only fetch master branch

  • Loading branch information...
commit ff9a35d980dd80f93883344a7cb278eeee5175f6 1 parent 2396c57
Max Howell authored August 29, 2012

Showing 1 changed file with 3 additions and 3 deletions. Show diff stats Hide diff stats

  1. 6  install
6  install
@@ -130,12 +130,12 @@ end
130 130
 ohai "Downloading and Installing Homebrew..."
131 131
 Dir.chdir "/usr/local" do
132 132
   if git
133  
-    # we do it in three steps to avoid fetching other branches
  133
+    # we do it in four steps to avoid merge errors when reinstalling
134 134
     system git, "init", "-q"
135 135
     system git, "remote", "add", "origin", "https://github.com/mxcl/homebrew"
136 136
 
137  
-    args = git, "fetch", "origin", "--depth=1"
138  
-    args.pop unless ARGV.include? "--fast"
  137
+    args = git, "fetch", "origin", "master:refs/remotes/origin/master", "-n"
  138
+    args << "--depth=1" if ARGV.include? "--fast"
139 139
     system *args
140 140
 
141 141
     system git, "reset", "--hard", "origin/master"

0 notes on commit ff9a35d

Please sign in to comment.
Something went wrong with that request. Please try again.