From 27831204e1c9a2e31ebfed6eb90fbaa9d6039367 Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 8 Nov 2016 07:45:19 +0000 Subject: [PATCH] vcs.rb: expand srcdir * tool/vcs.rb (VCS::GIT#initialize): expand srcdir if it is a local path. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56669 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- tool/vcs.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tool/vcs.rb b/tool/vcs.rb index 3451e226da..ba8be9044a 100644 --- a/tool/vcs.rb +++ b/tool/vcs.rb @@ -360,6 +360,14 @@ class VCS [last, changed, modified, branch, title] end + def initialize(*) + super + if srcdir = @srcdir and self.class.local_path?(srcdir) + @srcdir = File.realpath(srcdir) + end + self + end + def cmd_pipe(*cmds, &block) self.class.cmd_pipe_at(@srcdir, cmds, &block) end