Browse files

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 #6851
  • Loading branch information...
mxcl committed Aug 6, 2011
1 parent 2abfba1 commit 9e5e27b425d69d1a7b68f6f6a584c22b268738b2
Showing with 1 addition and 1 deletion.
  1. +1 −1 Library/Homebrew/cmd/update.rb
@@ -42,7 +42,7 @@ def update_from_masterbrew!
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"

0 comments on commit 9e5e27b

Please sign in to comment.