diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb index a170459e68..a3996909e1 100644 --- a/Library/Homebrew/download_strategy.rb +++ b/Library/Homebrew/download_strategy.rb @@ -366,8 +366,8 @@ class GitDownloadStrategy < AbstractDownloadStrategy else # otherwise the checkout-index won't checkout HEAD # https://github.com/mxcl/homebrew/issues/7124 - # must specify origin/master, otherwise it resets to the current local HEAD - quiet_safe_system "git", "reset", "--hard", "origin/master" + # must specify origin/HEAD, otherwise it resets to the current local HEAD + quiet_safe_system "git", "reset", "--hard", "origin/HEAD" end # http://stackoverflow.com/questions/160608/how-to-do-a-git-export-like-svn-export safe_system 'git', 'checkout-index', '-a', '-f', "--prefix=#{dst}/"