From 992ec36295854dd3ad61b634ce2faeb6fdccfb22 Mon Sep 17 00:00:00 2001 From: rick Date: Tue, 11 Jan 2011 00:04:38 -0800 Subject: [PATCH] accidental removal --- lib/gollum/wiki.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lib/gollum/wiki.rb b/lib/gollum/wiki.rb index a93e0e83..d736b6da 100644 --- a/lib/gollum/wiki.rb +++ b/lib/gollum/wiki.rb @@ -566,6 +566,20 @@ module Gollum repo.git.native(:diff, {:R => true}, sha1, sha2, '--', page.path) end + # Ensures a commit hash has all the required fields for a commit. + # + # commit - The commit Hash details: + # :message - The String commit message. + # :name - The String author full name. + # :email - The String email address. + # + # Returns the commit Hash + def normalize_commit(commit = {}) + commit[:name] = default_committer_name if commit[:name].to_s.empty? + commit[:email] = default_committer_email if commit[:email].to_s.empty? + commit + end + # Gets the default name for commits. # # Returns the String name.