summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Tucker <jftucker@gmail.com>2013-01-28 14:49:43 -0800
committerJames Tucker <jftucker@gmail.com>2013-01-28 14:49:43 -0800
commit42b11a7fb918127143ca570af9930b2e7ef7222c (patch)
treef03dd6db8238d0c5b46015b61cf567386c8bd227
parent569fd1b53daef7d03388b6064fe9d56dcc3859fb (diff)
downloadrack-42b11a7fb918127143ca570af9930b2e7ef7222c.tar.gz
Fix ChangeLog generation on 1.9.3+1.5.1
-rw-r--r--Rakefile4
1 files changed, 3 insertions, 1 deletions
diff --git a/Rakefile b/Rakefile
index 6bfe82ef..dcd253d4 100644
--- a/Rakefile
+++ b/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)