diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-11-08 10:44:21 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-11-08 10:44:21 +0000 |
commit | eb8ae3bdda33f9a9f95b334a2fe974aa1fde9868 (patch) | |
tree | 166400f6215758cf0f08bc4a6509a9361cd181c9 /tool | |
parent | a4e0e75881174b61ad5f3739541353e68fa10fff (diff) |
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.rb | 8 |
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 |