Merge pull request #6748 from issyl0/drop-local-from-gitconfig-commands
Remove `--local` from `git config` commands as it's the default
This commit is contained in:
commit
acda2b1bc9
@ -40,11 +40,11 @@ module Homebrew
|
|||||||
|
|
||||||
HOMEBREW_REPOSITORY.cd do
|
HOMEBREW_REPOSITORY.cd do
|
||||||
analytics_message_displayed =
|
analytics_message_displayed =
|
||||||
Utils.popen_read("git", "config", "--local", "--get", "homebrew.analyticsmessage").chomp == "true"
|
Utils.popen_read("git", "config", "--get", "homebrew.analyticsmessage").chomp == "true"
|
||||||
cask_analytics_message_displayed =
|
cask_analytics_message_displayed =
|
||||||
Utils.popen_read("git", "config", "--local", "--get", "homebrew.caskanalyticsmessage").chomp == "true"
|
Utils.popen_read("git", "config", "--get", "homebrew.caskanalyticsmessage").chomp == "true"
|
||||||
analytics_disabled =
|
analytics_disabled =
|
||||||
Utils.popen_read("git", "config", "--local", "--get", "homebrew.analyticsdisabled").chomp == "true"
|
Utils.popen_read("git", "config", "--get", "homebrew.analyticsdisabled").chomp == "true"
|
||||||
if !analytics_message_displayed &&
|
if !analytics_message_displayed &&
|
||||||
!cask_analytics_message_displayed &&
|
!cask_analytics_message_displayed &&
|
||||||
!analytics_disabled &&
|
!analytics_disabled &&
|
||||||
@ -65,19 +65,19 @@ module Homebrew
|
|||||||
|
|
||||||
# Consider the message possibly missed if not a TTY.
|
# Consider the message possibly missed if not a TTY.
|
||||||
if $stdout.tty?
|
if $stdout.tty?
|
||||||
safe_system "git", "config", "--local", "--replace-all", "homebrew.analyticsmessage", "true"
|
safe_system "git", "config", "--replace-all", "homebrew.analyticsmessage", "true"
|
||||||
safe_system "git", "config", "--local", "--replace-all", "homebrew.caskanalyticsmessage", "true"
|
safe_system "git", "config", "--replace-all", "homebrew.caskanalyticsmessage", "true"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
donation_message_displayed =
|
donation_message_displayed =
|
||||||
Utils.popen_read("git", "config", "--local", "--get", "homebrew.donationmessage").chomp == "true"
|
Utils.popen_read("git", "config", "--get", "homebrew.donationmessage").chomp == "true"
|
||||||
unless donation_message_displayed
|
unless donation_message_displayed
|
||||||
ohai "Homebrew is run entirely by unpaid volunteers. Please consider donating:"
|
ohai "Homebrew is run entirely by unpaid volunteers. Please consider donating:"
|
||||||
puts " #{Formatter.url("https://github.com/Homebrew/brew#donations")}\n"
|
puts " #{Formatter.url("https://github.com/Homebrew/brew#donations")}\n"
|
||||||
|
|
||||||
# Consider the message possibly missed if not a TTY.
|
# Consider the message possibly missed if not a TTY.
|
||||||
safe_system "git", "config", "--local", "--replace-all", "homebrew.donationmessage", "true" if $stdout.tty?
|
safe_system "git", "config", "--replace-all", "homebrew.donationmessage", "true" if $stdout.tty?
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -340,7 +340,7 @@ module Homebrew
|
|||||||
# GitHub API responds immediately but fork takes a few seconds to be ready.
|
# GitHub API responds immediately but fork takes a few seconds to be ready.
|
||||||
sleep 3
|
sleep 3
|
||||||
|
|
||||||
if system("git", "config", "--local", "--get-regexp", "remote\..*\.url", "git@github.com:.*")
|
if system("git", "config", "--get-regexp", "remote\..*\.url", "git@github.com:.*")
|
||||||
remote_url = response.fetch("ssh_url")
|
remote_url = response.fetch("ssh_url")
|
||||||
else
|
else
|
||||||
remote_url = response.fetch("clone_url")
|
remote_url = response.fetch("clone_url")
|
||||||
|
|||||||
@ -91,11 +91,11 @@ module Homebrew
|
|||||||
oh1 "Setup test environment..."
|
oh1 "Setup test environment..."
|
||||||
# copy Homebrew installation
|
# copy Homebrew installation
|
||||||
safe_system "git", "clone", "#{HOMEBREW_REPOSITORY}/.git", ".",
|
safe_system "git", "clone", "#{HOMEBREW_REPOSITORY}/.git", ".",
|
||||||
"--local", "--branch", "master", "--single-branch"
|
"--branch", "master", "--single-branch"
|
||||||
|
|
||||||
# set git origin to another copy
|
# set git origin to another copy
|
||||||
safe_system "git", "clone", "#{HOMEBREW_REPOSITORY}/.git", "remote.git",
|
safe_system "git", "clone", "#{HOMEBREW_REPOSITORY}/.git", "remote.git",
|
||||||
"--local", "--bare", "--branch", "master", "--single-branch"
|
"--bare", "--branch", "master", "--single-branch"
|
||||||
safe_system "git", "config", "remote.origin.url", "#{curdir}/remote.git"
|
safe_system "git", "config", "remote.origin.url", "#{curdir}/remote.git"
|
||||||
|
|
||||||
# force push origin to end_commit
|
# force push origin to end_commit
|
||||||
|
|||||||
@ -729,7 +729,7 @@ class TapConfig
|
|||||||
return unless Utils.git_available?
|
return unless Utils.git_available?
|
||||||
|
|
||||||
tap.path.cd do
|
tap.path.cd do
|
||||||
Utils.popen_read("git", "config", "--local", "--get", "homebrew.#{key}").chomp.presence
|
Utils.popen_read("git", "config", "--get", "homebrew.#{key}").chomp.presence
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -738,7 +738,7 @@ class TapConfig
|
|||||||
return unless Utils.git_available?
|
return unless Utils.git_available?
|
||||||
|
|
||||||
tap.path.cd do
|
tap.path.cd do
|
||||||
safe_system "git", "config", "--local", "--replace-all", "homebrew.#{key}", value.to_s
|
safe_system "git", "config", "--replace-all", "homebrew.#{key}", value.to_s
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user