normalize commit hashes so they at least show 'anonymous' if no git user is set.

This commit is contained in:
rick
2010-08-16 07:36:32 -07:00
parent 763387979a
commit ee04dd84aa
3 changed files with 44 additions and 8 deletions
+3 -6
View File
@@ -143,12 +143,9 @@ module Precious
end
def commit_message
message = params[:message]
author_name = `git config --get user.name`.strip || 'Anonymous'
author_email = `git config --get user.email`.strip || 'anon@anon.com'
{ :message => message,
:name => author_name,
:email => author_email }
{ :message => params[:message],
:name => `git config --get user.name `.strip,
:email => `git config --get user.email`.strip }
end
end
end