diff options
| author | Jack Nagel | 2011-07-30 19:32:35 -0500 |
|---|---|---|
| committer | Max Howell | 2011-08-02 13:21:06 +0100 |
| commit | fd6c9833c68c666d55195e208f81d616c149d00d (patch) | |
| tree | 9c162151a57913fe173d99e72f7e7393bd04e79a /Library | |
| parent | 616b52e627085b19d0d9023b94464d93e0f54131 (diff) | |
| download | brew-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.rb | 2 |
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 |
