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:
parent
f560609d66
commit
d83ade1db5
1 changed files with 1 additions and 3 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue