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:
parent
bc77cda8fd
commit
7fd51c0241
1 changed files with 5 additions and 2 deletions
|
@ -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(*)
|
||||
|
|
Loading…
Reference in a new issue