I'd like to have a commit message cleanup that will not necessarily remove lines beginning with a # in the message itself. The default --cleanup=strip removes all lines starting with a # character. 
The reason being is unfortunately, the Trac engine's wiki formatter uses hashes in the beginning of a code block to denote the syntax type. This creates difficulty when using the engine's syntax in my commit messages.
Example:
Created demo of perl added to helloworld.pl
{{{
#!/usr/bin/perl
use strict;
# say hi to the user.
print "hello world\n";
}}}
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
# On branch master
# Changes to be committed:
#   (use "git reset HEAD^1 <file>..." to unstage)
#
#   added:   helloworld.pl
# and so on and so forth...
I would like the following result in the final logged commit message:
commit 1234567890123456789012345678901234567890
Author: Danny <...>
Date:   Wed Apr 7 13:34:29 2010 -0400
     Created demo of perl added to helloworld.pl
     {{{
     #!/usr/bin/perl
     use strict;
     # say hi to the user.
     print "hello world\n";
     }}}
I'd like to use a custom filter that removes all lines beginning with a hash from the bottom of the commit message upwards. Leaving the lines in the message I have added alone. Where or how can I specify this in git?
Note, creating a sed or perl script to perform the operation is not a problem, just knowing where to hook it into git is the question.
My apologies on the confusion of my question, I hadn't realized how vague it was.