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

ruby-changes:73597

From: Takashi <ko1@a...>
Date: Sat, 17 Sep 2022 23:06:33 +0900 (JST)
Subject: [ruby-changes:73597] 922e61fcc2 (master): Remove git command existence check again

https://git.ruby-lang.org/ruby.git/commit/?id=922e61fcc2

From 922e61fcc22abfc86a9805ccf52ba9f8edeca17c Mon Sep 17 00:00:00 2001
From: Takashi Kokubun <takashikkbn@g...>
Date: Sat, 17 Sep 2022 23:05:06 +0900
Subject: Remove git command existence check again

With 33c6dd2cc89c27bbf406508ec39038a181fb99bc, it's no longer necessary.

This is what I got on openbsd-current:

```
-bash-5.1$ git -v
unknown option: -v
usage: git [--version] [--help] [-C <path>] [-c <name>=<value>]
           [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
           [-p | --paginate | -P | --no-pager] [--no-replace-objects] [--bare]
           [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
           [--super-prefix=<path>] [--config-env=<name>=<envvar>]
           <command> [<args>]
-bash-5.1$ git version
git version 2.35.1
```
---
 tool/lib/vcs.rb | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/tool/lib/vcs.rb b/tool/lib/vcs.rb
index 29f2327bc3..87ed15f7d1 100644
--- a/tool/lib/vcs.rb
+++ b/tool/lib/vcs.rb
@@ -397,10 +397,7 @@ class VCS https://github.com/ruby/ruby/blob/trunk/tool/lib/vcs.rb#L397
   end
 
   class GIT < self
-    register(".git") do |path, dir|
-      File.exist?(File.join(path, dir)) &&
-        (`#{COMMAND} -v` rescue false) # make sure git command exists
-    end
+    register(".git") { |path, dir| File.exist?(File.join(path, dir)) }
     COMMAND = ENV["GIT"] || 'git'
 
     def cmd_args(cmds, srcdir = nil)
-- 
cgit v1.2.1


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

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