summaryrefslogtreecommitdiff
path: root/tool/vcs.rb
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2019-04-28 10:41:11 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-04-28 10:41:32 +0900
commitd47cd75b4fead0cfc5fdb59c48d5d822ffe3382d (patch)
tree1238649a41d93b51f3b77030b4b51451daae33cb /tool/vcs.rb
parent7790b610b8c11ae987e0f9a936418a7a34a8af0b (diff)
Chomp a newline from the branch name
Diffstat (limited to 'tool/vcs.rb')
-rw-r--r--tool/vcs.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/tool/vcs.rb b/tool/vcs.rb
index cf8a710..3eb6389 100644
--- a/tool/vcs.rb
+++ b/tool/vcs.rb
@@ -392,6 +392,7 @@ class VCS
changed = changed[0, last.size]
modified = log[/^Date:\s+(.*)/, 1]
branch = cmd_read_at(srcdir, [gitcmd + %W[symbolic-ref --short HEAD]])
+ branch.chomp!
title = cmd_read_at(srcdir, [gitcmd + %W[log --format=%s -n1 FETCH_HEAD..HEAD]])
title = nil if title.empty?
[last, changed, modified, branch, title]