aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/download_strategy.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb
index cfdaaa7be..d043ef450 100644
--- a/Library/Homebrew/download_strategy.rb
+++ b/Library/Homebrew/download_strategy.rb
@@ -346,7 +346,8 @@ class GitDownloadStrategy < AbstractDownloadStrategy
else
# otherwise the checkout-index won't checkout HEAD
# https://github.com/mxcl/homebrew/issues/7124
- quiet_safe_system "git", "reset", "--hard"
+ # must specify origin/master, otherwise it resets to the current local HEAD
+ quiet_safe_system "git", "reset", "--hard", "origin/master"
end
# http://stackoverflow.com/questions/160608/how-to-do-a-git-export-like-svn-export
safe_system 'git', 'checkout-index', '-a', '-f', "--prefix=#{dst}/"