1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

vcs.rb: ignore configuration files get rid of aliases [ci skip]

This commit is contained in:
Nobuyoshi Nakada 2022-06-22 09:33:25 +09:00
parent bc77cda8fd
commit 7fd51c0241
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6

View file

@ -460,10 +460,13 @@ class VCS
end
def without_gitconfig
home = ENV.delete('HOME')
envs = %w'HOME XDG_CONFIG_HOME GIT_SYSTEM_CONFIG GIT_CONFIG_SYSTEM'.each_with_object({}) do |v, h|
h[v] = ENV.delete(v)
ENV[v] = NullDevice if v.start_with?('GIT_')
end
yield
ensure
ENV['HOME'] = home if home
ENV.update(envs)
end
def initialize(*)