summaryrefslogtreecommitdiff
path: root/tool/vcs.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-01-17 13:56:28 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-01-17 13:56:28 +0000
commitae27382632423a09095715842c6af2bcb6a3dc62 (patch)
tree645bf368362b934995a38fcd537c0f95c0606ac8 /tool/vcs.rb
parent63491598c6870c3097833d2a4666f38098b6b238 (diff)
vcs.rb: no empty names
* tool/vcs.rb (get_revisions): branch names must not be empty. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49304 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool/vcs.rb')
-rw-r--r--tool/vcs.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/tool/vcs.rb b/tool/vcs.rb
index 9371ae287d..d4b87ec781 100644
--- a/tool/vcs.rb
+++ b/tool/vcs.rb
@@ -135,7 +135,7 @@ class VCS
info_xml = IO.pread(%W"svn info --xml #{path}")
_, last, _, changed, _ = info_xml.split(/revision="(\d+)"/)
modified = info_xml[/<date>([^<>]*)/, 1]
- branch = info_xml[%r'<relative-url>\^/(?:branches/|tags/)?([^<>]*)', 1]
+ branch = info_xml[%r'<relative-url>\^/(?:branches/|tags/)?([^<>]+)', 1]
[last, changed, modified, branch]
end
@@ -209,7 +209,7 @@ class VCS
cmd = %W[git]
cmd.push("-C", srcdir) if srcdir
cmd.push("symbolic-ref", "HEAD")
- branch = IO.pread(cmd)[%r'\A(?:refs/heads/)?(.*)', 1]
+ branch = IO.pread(cmd)[%r'\A(?:refs/heads/)?(.+)', 1]
[last, changed, modified, branch]
end