[前][次][番号順一覧][スレッド一覧]

ruby-changes:72277

From: Nobuyoshi <ko1@a...>
Date: Wed, 22 Jun 2022 09:57:56 +0900 (JST)
Subject: [ruby-changes:72277] 7fd51c0241 (master): vcs.rb: ignore configuration files get rid of aliases [ci skip]

https://git.ruby-lang.org/ruby.git/commit/?id=7fd51c0241

From 7fd51c0241f767ebe434c43568a4605cdb692e94 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
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 https://github.com/ruby/ruby/blob/trunk/tool/lib/vcs.rb#L460
     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.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]