]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Plugin/git.pm
Merge branch 'master' into sipb
[ikiwiki.git] / IkiWiki / Plugin / git.pm
index 786c7b1f246652d5d0ba73ec0f839535be5e7430..e3e1448d357ac11ea611f4c14d9b81472258861d 100644 (file)
@@ -4,6 +4,7 @@ package IkiWiki::Plugin::git;
 use warnings;
 use strict;
 use IkiWiki;
+use IkiWiki::UserInfo;
 use Encode;
 use open qw{:utf8 :std};
 
@@ -51,6 +52,9 @@ sub checkconfig () {
                        wrappermode => (defined $config{git_wrappermode} ? $config{git_wrappermode} : "06755"),
                };
        }
+
+       # Avoid notes, parser does not handle and they only slow things down.
+       $ENV{GIT_NOTES_REF}="";
        
        # Run receive test only if being called by the wrapper, and not
        # when generating same.
@@ -65,6 +69,7 @@ sub getsetup () {
                plugin => {
                        safe => 0, # rcs plugin
                        rebuild => undef,
+                       section => "rcs",
                },
                git_wrapper => {
                        type => "string",
@@ -472,8 +477,9 @@ sub rcs_commit_staged ($$$) {
        my %env=%ENV;
        if (defined $user || defined $ipaddr) {
                my $u=encode_utf8(defined $user ? $user : $ipaddr);
-               $ENV{GIT_AUTHOR_NAME}=$u;
-               $ENV{GIT_AUTHOR_EMAIL}="$u\@web";
+               # MITLOGIN This algorithm could be improved
+               $ENV{GIT_AUTHOR_NAME}=IkiWiki::userinfo_get($u, "realname");
+               $ENV{GIT_AUTHOR_EMAIL}="$u\@mit.edu";
        }
 
        $message = IkiWiki::possibly_foolish_untaint($message);