From 2635817ca8ddde76d09e66bcad62213176c0601d Mon Sep 17 00:00:00 2001
From: Chris Kampmeier <chris@kampers.net>
Date: Sun, 15 Dec 2013 05:13:08 -0800
Subject: [PATCH] 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 Homebrew/homebrew#25230.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
---
 Library/Homebrew/cmd/doctor.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Library/Homebrew/cmd/doctor.rb b/Library/Homebrew/cmd/doctor.rb
index f4fe611d77..efefdc72cd 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.
-- 
GitLab