1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Chomp a newline from the branch name

This commit is contained in:
Nobuyoshi Nakada 2019-04-28 10:41:11 +09:00
parent 7790b610b8
commit d47cd75b4f
No known key found for this signature in database
GPG key ID: 4BC7D6DF58D8DF60

View file

@ -392,6 +392,7 @@ class VCS
changed = changed[0, last.size] changed = changed[0, last.size]
modified = log[/^Date:\s+(.*)/, 1] modified = log[/^Date:\s+(.*)/, 1]
branch = cmd_read_at(srcdir, [gitcmd + %W[symbolic-ref --short HEAD]]) 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 = cmd_read_at(srcdir, [gitcmd + %W[log --format=%s -n1 FETCH_HEAD..HEAD]])
title = nil if title.empty? title = nil if title.empty?
[last, changed, modified, branch, title] [last, changed, modified, branch, title]