Permalink
Browse files

Fix ChangeLog generation on 1.9.3+

  • Loading branch information...
1 parent 569fd1b commit 42b11a7fb918127143ca570af9930b2e7ef7222c @raggi raggi committed Jan 28, 2013
Showing with 3 additions and 1 deletion.
  1. +3 −1 Rakefile
View
4 Rakefile
@@ -52,7 +52,9 @@ task :changelog => %w[ChangeLog]
file '.git/index'
file "ChangeLog" => '.git/index' do
File.open("ChangeLog", "w") { |out|
- `git log -z`.split("\0").map { |chunk|
+ log = `git log -z`
+ log.force_encoding(Encoding::BINARY) if log.respond_to?(:force_encoding)
+ log.split("\0").map { |chunk|
author = chunk[/Author: (.*)/, 1].strip
date = chunk[/Date: (.*)/, 1].strip
desc, detail = $'.strip.split("\n", 2)

0 comments on commit 42b11a7

Please sign in to comment.