diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2022-06-22 09:33:25 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2022-06-22 09:33:25 +0900 |
commit | 7fd51c0241f767ebe434c43568a4605cdb692e94 (patch) | |
tree | 8708a973c5720f23fdc99cd771e9cf1a6d39a602 /tool/lib | |
parent | bc77cda8fd70b3bb2407b7cc612ccb963e5cc876 (diff) |
vcs.rb: ignore configuration files get rid of aliases [ci skip]
Diffstat (limited to 'tool/lib')
-rw-r--r-- | tool/lib/vcs.rb | 7 |
1 files 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(*) |