diff options
| author | Chris Kampmeier | 2013-12-15 05:13:08 -0800 |
|---|---|---|
| committer | Mike McQuaid | 2013-12-15 17:20:45 +0000 |
| commit | 591516dee5f1844a6a0947469c7a78efbb3ffe7e (patch) | |
| tree | 5b7e2c4bc03b25eeef37d76b5e0aede85ea6652e /Library/Homebrew/cmd/doctor.rb | |
| parent | 082ed460e08649ca1be9c748586021c51d4adc6f (diff) | |
| download | homebrew-591516dee5f1844a6a0947469c7a78efbb3ffe7e.tar.bz2 | |
doctor: don't let gitconfig break dirty-tree check
`brew doctor` always complains about uncommitted modifications to
Homebrew when you have status.branch=true in your git config, because
the implicit --branch makes `git status -s` always print branch/tracking
info. The --porcelain mode is similar to -s/--short, but ignores most of
the user's config and should remain stable.
The --untracked-files option ensures we'll see untracked files even for
users with status.showUntrackedFiles=no, which is not suppressed by
--porcelain for some reason.
Closes #25230.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library/Homebrew/cmd/doctor.rb')
| -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 f4fe611d7..efefdc72c 100644 --- a/Library/Homebrew/cmd/doctor.rb +++ b/Library/Homebrew/cmd/doctor.rb @@ -909,7 +909,7 @@ end def check_git_status return unless which "git" HOMEBREW_REPOSITORY.cd do - unless `git status -s -- Library/Homebrew/ 2>/dev/null`.chomp.empty? + unless `git status --untracked-files=all --porcelain -- Library/Homebrew/ 2>/dev/null`.chomp.empty? <<-EOS.undent_________________________________________________________72 You have uncommitted modifications to Homebrew If this a surprise to you, then you should stash these modifications. |
