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
commitcbcd4a32a648d2dfc808066dc3200f92c1a2f020 (patch)
tree5dbc5a320e0313b3ec7df1a5fbe8478df8723f7a /Library
parent99448364f4620afd07298c4267ed8c348c42f76e (diff)
downloadhomebrew-cbcd4a32a648d2dfc808066dc3200f92c1a2f020.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 #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