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

Use -z option for git-log

This commit is contained in:
Nobuyoshi Nakada 2019-09-02 23:42:21 +09:00
parent f560609d66
commit d83ade1db5
No known key found for this signature in database
GPG key ID: 4BC7D6DF58D8DF60

View file

@ -660,14 +660,12 @@ class VCS
end
def format_changelog(path, arg)
cmd = %W"#{COMMAND} log --topo-order --no-notes"
cmd << "--format=%x00%an%n%at%n%B"
cmd = %W"#{COMMAND} log --topo-order --no-notes -z --format=%an%n%at%n%B"
cmd.concat(arg)
open(path, 'w') do |w|
sep = "-"*72
w.puts sep
cmd_pipe(cmd) do |r|
r.getc # skip first NUL
while s = r.gets("\0")
s.chomp!("\0")
author, time, s = s.split("\n", 3)