aboutsummaryrefslogtreecommitdiffstats
path: root/tool/vcs.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-11-08 07:45:19 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-11-08 07:45:19 +0000
commitb3d19ea4349ece839fbd8f8ce007782195f96c82 (patch)
tree89641d2e177df690a5be6e5746724306e368ba85 /tool/vcs.rb
parente7575f9e0a818db85b7754b2379eaa69ca2488b9 (diff)
downloadruby-b3d19ea4349ece839fbd8f8ce007782195f96c82.tar.gz
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
Diffstat (limited to 'tool/vcs.rb')
-rw-r--r--tool/vcs.rb8
1 files changed, 8 insertions, 0 deletions
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