aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
authorMike McQuaid2013-01-27 19:37:46 +0000
committerMike McQuaid2013-01-29 17:14:00 -0800
commited357d9847539b25b473bc52846ceadaec7eb75a (patch)
tree2c4296323ce037d286c9d97a732779c276339252 /Library/Homebrew
parent34f7f9586c2d783a4a77938f787d4d73566ef6fd (diff)
downloadhomebrew-ed357d9847539b25b473bc52846ceadaec7eb75a.tar.bz2
Improve `brew doctor` autocrlf check.
Closes #15711.
Diffstat (limited to 'Library/Homebrew')
-rw-r--r--Library/Homebrew/cmd/doctor.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/Library/Homebrew/cmd/doctor.rb b/Library/Homebrew/cmd/doctor.rb
index c8df1c742..94e466f3e 100644
--- a/Library/Homebrew/cmd/doctor.rb
+++ b/Library/Homebrew/cmd/doctor.rb
@@ -723,15 +723,17 @@ def check_git_newline_settings
autocrlf = `git config --get core.autocrlf`.chomp
safecrlf = `git config --get core.safecrlf`.chomp
- if autocrlf == 'input' and safecrlf == 'true' then <<-EOS.undent
+ unless autocrlf == 'false' then <<-EOS.undent
Suspicious Git newline settings found.
- The detected Git newline settings can cause checkout problems:
+ The detected Git newline settings will cause checkout problems:
core.autocrlf = #{autocrlf}
- core.safecrlf = #{safecrlf}
If you are not routinely dealing with Windows-based projects,
consider removing these settings.
+
+ Alternatively run:
+ `git config -f #{HOMEBREW_REPOSITORY}/.git/config --add core.autocrlf false`
EOS
end
end