aboutsummaryrefslogtreecommitdiffstats
path: root/tool
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-11-08 10:44:21 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-11-08 10:44:21 +0000
commit99528d5ae1fed87475631f1498556a7494d23647 (patch)
tree166400f6215758cf0f08bc4a6509a9361cd181c9 /tool
parent919279b25279a9158ade4f67ff358a3ad20ca10b (diff)
downloadruby-99528d5ae1fed87475631f1498556a7494d23647.tar.gz
vcs.rb: fix GIT.get_revisions
* tool/vcs.rb (VCS::GIT.get_revisions): fix for out-of-place build. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56673 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool')
-rw-r--r--tool/vcs.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/tool/vcs.rb b/tool/vcs.rb
index 9b8e417032..95cb0da7a6 100644
--- a/tool/vcs.rb
+++ b/tool/vcs.rb
@@ -343,20 +343,20 @@ class VCS
logcmd = gitcmd + %W[log -n1 --date=iso]
logcmd << "--grep=^ *git-svn-id: .*@[0-9][0-9]*"
idpat = /git-svn-id: .*?@(\d+) \S+\Z/
- log = IO.pread(logcmd)
+ log = cmd_read_at(srcdir, [logcmd])
commit = log[/\Acommit (\w+)/, 1]
last = log[idpat, 1]
if path
cmd = logcmd
cmd += [path] unless path == '.'
- log = IO.pread(cmd)
+ log = cmd_read_at(srcdir, [cmd])
changed = log[idpat, 1]
else
changed = last
end
modified = log[/^Date:\s+(.*)/, 1]
- branch = IO.pread(gitcmd + %W[symbolic-ref HEAD])[%r'\A(?:refs/heads/)?(.+)', 1]
- title = IO.pread(gitcmd + %W[log --format=%s -n1 #{commit}..HEAD])
+ branch = cmd_read_at(srcdir, [gitcmd + %W[symbolic-ref HEAD]])[%r'\A(?:refs/heads/)?(.+)', 1]
+ title = cmd_read_at(srcdir, [gitcmd + %W[log --format=%s -n1 #{commit}..HEAD]])
title = nil if title.empty?
[last, changed, modified, branch, title]
end