From 7fd51c0241f767ebe434c43568a4605cdb692e94 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Wed, 22 Jun 2022 09:33:25 +0900 Subject: vcs.rb: ignore configuration files get rid of aliases [ci skip] --- tool/lib/vcs.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tool/lib/vcs.rb b/tool/lib/vcs.rb index 5154a7298e..29be8db3b4 100644 --- a/tool/lib/vcs.rb +++ b/tool/lib/vcs.rb @@ -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(*) -- cgit v1.2.3