doctor: fix a couple of git-related checks
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
This commit is contained in:
parent
7df7bd6a48
commit
9f4f23a7f4
@ -570,8 +570,7 @@ def check_for_multiple_volumes
|
|||||||
end
|
end
|
||||||
|
|
||||||
def check_for_git
|
def check_for_git
|
||||||
git = `/usr/bin/which git`.chomp
|
unless system "/usr/bin/which -s git"
|
||||||
if git.empty?
|
|
||||||
puts <<-EOS.undent
|
puts <<-EOS.undent
|
||||||
"Git" was not found in your path.
|
"Git" was not found in your path.
|
||||||
|
|
||||||
@ -586,19 +585,18 @@ def check_for_git
|
|||||||
end
|
end
|
||||||
|
|
||||||
def check_git_newline_settings
|
def check_git_newline_settings
|
||||||
git = `/usr/bin/which git`.chomp
|
return unless system "/usr/bin/which -s git"
|
||||||
return if git.empty?
|
|
||||||
|
|
||||||
autocrlf=`git config --get core.autocrlf`
|
autocrlf = `git config --get core.autocrlf`.chomp
|
||||||
safecrlf=`git config --get core.safecrlf`
|
safecrlf = `git config --get core.safecrlf`.chomp
|
||||||
|
|
||||||
if autocrlf=='input' and safecrlf=='true'
|
if autocrlf == 'input' and safecrlf == 'true'
|
||||||
puts <<-EOS.undent
|
puts <<-EOS.undent
|
||||||
Suspicious Git newline settings found.
|
Suspicious Git newline settings found.
|
||||||
|
|
||||||
The detected Git newline settings can cause checkout problems:
|
The detected Git newline settings can cause checkout problems:
|
||||||
core.autocrlf=#{autocrlf}
|
core.autocrlf = #{autocrlf}
|
||||||
core.safecrlf=#{safecrlf}
|
core.safecrlf = #{safecrlf}
|
||||||
|
|
||||||
If you are not routinely dealing with Windows-based projects,
|
If you are not routinely dealing with Windows-based projects,
|
||||||
consider removing these settings.
|
consider removing these settings.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user