Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
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...
commit 9e5e27b425d69d1a7b68f6f6a584c22b268738b2 1 parent 2abfba1
@mxcl mxcl authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  Library/Homebrew/cmd/update.rb
View
2  Library/Homebrew/cmd/update.rb
@@ -42,7 +42,7 @@ def update_from_masterbrew!
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
Please sign in to comment.
Something went wrong with that request. Please try again.