Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
brew
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to JiHu GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
KMSCAKKSCFKA AKFACAMADCAS
brew
Commits
cf5ecfc0
Commit
cf5ecfc0
authored
10 years ago
by
Jack Nagel
Browse files
Options
Downloads
Patches
Plain Diff
doctor: suppress warnings from git wrapper script
Fixes Homebrew/homebrew#28901.
parent
37760ce3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Library/Homebrew/cmd/doctor.rb
+13
-5
13 additions, 5 deletions
Library/Homebrew/cmd/doctor.rb
with
13 additions
and
5 deletions
Library/Homebrew/cmd/doctor.rb
+
13
−
5
View file @
cf5ecfc0
...
...
@@ -53,6 +53,14 @@ class Checks
def
inject_file_list
(
list
,
str
)
list
.
inject
(
str
)
{
|
s
,
f
|
s
<<
"
#{
f
}
\n
"
}
end
# Git will always be on PATH because of the wrapper script in
# Library/Contributions/cmd, so we check if there is a *real*
# git here to avoid multiple warnings.
def
git?
return
@git
if
instance_variable_defined?
(
:@git
)
@git
=
which
(
"git"
)
&&
quiet_system
(
"git"
,
"--version"
)
end
############# END HELPERS
# Sorry for the lack of an indent here, the diff would have been unreadable.
...
...
@@ -728,7 +736,7 @@ def __check_git_version
end
def
check_for_git
if
which
"
git
"
if
git
?
__check_git_version
else
<<-
EOS
.
undent
Git could not be found in your PATH.
...
...
@@ -740,7 +748,7 @@ def check_for_git
end
def
check_git_newline_settings
return
unless
which
"
git
"
return
unless
git
?
autocrlf
=
`git config --get core.autocrlf`
.
chomp
...
...
@@ -758,7 +766,7 @@ def check_git_newline_settings
end
def
check_git_origin
return
unless
which
(
'
git
'
)
&&
(
HOMEBREW_REPOSITORY
/
'.git'
).
exist?
return
unless
git
?
&&
(
HOMEBREW_REPOSITORY
/
'.git'
).
exist?
HOMEBREW_REPOSITORY
.
cd
do
origin
=
`git config --get remote.origin.url`
.
strip
...
...
@@ -902,7 +910,7 @@ def check_missing_deps
end
def
check_git_status
return
unless
which
"
git
"
return
unless
git
?
HOMEBREW_REPOSITORY
.
cd
do
unless
`git status --untracked-files=all --porcelain -- Library/Homebrew/ 2>/dev/null`
.
chomp
.
empty?
<<-
EOS
.
undent_________________________________________________________72
...
...
@@ -1014,7 +1022,7 @@ def check_for_pydistutils_cfg_in_home
end
def
check_for_outdated_homebrew
return
unless
which
'
git
'
return
unless
git
?
HOMEBREW_REPOSITORY
.
cd
do
if
File
.
directory?
".git"
local
=
`git rev-parse -q --verify refs/remotes/origin/master`
.
chomp
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment