aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2011-07-30 19:32:35 -0500
committerMax Howell2011-08-02 13:21:06 +0100
commitfd6c9833c68c666d55195e208f81d616c149d00d (patch)
tree9c162151a57913fe173d99e72f7e7393bd04e79a /Library
parent616b52e627085b19d0d9023b94464d93e0f54131 (diff)
downloadbrew-fd6c9833c68c666d55195e208f81d616c149d00d.tar.bz2
Fix `brew update` local changes bug
Users were seeing local changes in their repository after updating, even though they had made no local changes. The repository setup sequence should use `git reset --soft` rather than vanilla `git reset`, which defaults to '--mixed'. '--soft' updates _only_ HEAD, leaving the index as-is, allowing future incantations of `brew update` to proceed without errors. Fixes Homebrew/homebrew#6732.
Diffstat (limited to 'Library')
-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 599a9998c..c225b9176 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 FETCH_HEAD"
+ safe_system "git reset --soft FETCH_HEAD"
rescue Exception
safe_system "rm -rf .git"
raise