aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
authorMax Howell2011-08-06 11:11:06 +0100
committerMax Howell2011-08-06 11:11:06 +0100
commit554147fa99eaad902785ac7f7c2daaa7c5321f8a (patch)
tree1293d5e4fe47f9967c268803b69ba8b2b10c1bf6 /Library/Homebrew
parentc76ae1a94fce263a287fa02c49cd062770d96a35 (diff)
downloadbrew-554147fa99eaad902785ac7f7c2daaa7c5321f8a.tar.bz2
Reset --hard after the first git init
We don't know what revision the tarball was when homebrew was installed, so all we can do really is hard reset. In theory some set of git commands should suffice, but apparently --soft and --mixed resets ended up putting stuff in the index which would break subsequent `brew updates`. Fixes Homebrew/homebrew#6851
Diffstat (limited to 'Library/Homebrew')
-rw-r--r--Library/Homebrew/cmd/update.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/Library/Homebrew/cmd/update.rb b/Library/Homebrew/cmd/update.rb
index c225b9176..03ff29071 100644
--- a/Library/Homebrew/cmd/update.rb
+++ b/Library/Homebrew/cmd/update.rb
@@ -42,7 +42,7 @@ class RefreshBrew
begin
safe_system "git init"
safe_system "git fetch #{REPOSITORY_URL}"
- safe_system "git reset --soft FETCH_HEAD"
+ safe_system "git reset --hard FETCH_HEAD"
rescue Exception
safe_system "rm -rf .git"
raise