lib/commit_hook.rb in git-commit-notifier-0.3.0 vs lib/commit_hook.rb in git-commit-notifier-0.5.0
- old
+ new
@@ -38,19 +38,19 @@
@config = YAML::load_file(config) if File.exist?(config)
diff2html = DiffToHtml.new(Dir.pwd)
diff2html.diff_between_revisions rev1, rev2, prefix, ref_name
- result = diff2html.result
+ diffresult = diff2html.result
if (@config["ignore_merge"])
- result = result.reject {|result|
+ diffresult = diffresult.reject {|result|
!result[:commit_info][:merge].nil?
}
end
- result.reverse.each_with_index do |result, i|
- nr = number(result.size, i)
+ diffresult.reverse.each_with_index do |result, i|
+ nr = number(diffresult.size, i)
emailer = Emailer.new @config, project_path, recipient, result[:commit_info][:email], result[:commit_info][:author],
"[#{prefix}#{branch_name}]#{nr} #{result[:commit_info][:message]}", result[:text_content], result[:html_content], rev1, rev2, ref_name
emailer.send
end
end