diff options
| author | Patrick Lucas | 2012-06-13 13:10:27 -0400 |
|---|---|---|
| committer | Max Howell | 2012-08-06 15:59:12 -0400 |
| commit | 47cdd4d8190c2e8be4758c019c986ccccbe50f11 (patch) | |
| tree | a11beb213f195a9de38597c44596ad8448695ce2 /Library | |
| parent | 7c8a2656f0abe93d4d4d0619b4dd11903e3c51bf (diff) | |
| download | brew-47cdd4d8190c2e8be4758c019c986ccccbe50f11.tar.bz2 | |
Suggest git clean -f for untracked changes
Currently, if brew doctor detects untracked changes in the local repo,
it suggests doing 'git reset --hard', but that doesn't remove untracked
files. This change adds an additional suggestion to run 'git clean -f'
to remove them.
Closes Homebrew/homebrew#12814.
Signed-off-by: Max Howell <mxcl@me.com>
Changed the path to Library as we don't want to clean -f all over the whole /usr/local :P
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/cmd/doctor.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Library/Homebrew/cmd/doctor.rb b/Library/Homebrew/cmd/doctor.rb index 4117458ef..aa120c7aa 100644 --- a/Library/Homebrew/cmd/doctor.rb +++ b/Library/Homebrew/cmd/doctor.rb @@ -785,7 +785,7 @@ def check_git_status unless `git status -s -- Library/Homebrew/ 2>/dev/null`.chomp.empty? then <<-EOS.undent You have uncommitted modifications to Homebrew's core. Unless you know what you are doing, you should run: - cd #{HOMEBREW_REPOSITORY} && git reset --hard + cd #{HOMEBREW_REPOSITORY}/Library && git reset --hard && git clean -f EOS end end |
