From 28861d45ffe76cc39899e7ff532fb57023c55a18 Mon Sep 17 00:00:00 2001 From: Benjamin Stiglitz Date: Wed, 3 Jul 2013 08:28:17 -0400 Subject: [PATCH] Handle commits with newlines in the message. process_commit_data was toggling between message and header parsing for every bare newline encountered in the data, which led to the elision of every other paragraph in a commit message. Now the switch to message parsing is permanent; once the headers have been found we don't need to look for them any more. --- lib/git/lib.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/git/lib.rb b/lib/git/lib.rb index 21de727a..cf43d975 100644 --- a/lib/git/lib.rb +++ b/lib/git/lib.rb @@ -130,7 +130,7 @@ def process_commit_data(data, sha = nil, indent = 4) data.each do |line| line = line.chomp - if line == '' + if !in_message and line == '' in_message = !in_message elsif in_message hsh['message'] << line[indent..-1] << "\n"