diff options
Diffstat (limited to 'IkiWiki/Plugin/git.pm')
-rw-r--r-- | IkiWiki/Plugin/git.pm | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/IkiWiki/Plugin/git.pm b/IkiWiki/Plugin/git.pm index 3e289e0c3..8d210cb5d 100644 --- a/IkiWiki/Plugin/git.pm +++ b/IkiWiki/Plugin/git.pm @@ -606,12 +606,16 @@ sub rcs_recentchanges ($) { push @messages, { line => $line }; } - my $user=$ci->{'author_name'}; - my $usershort=$ci->{'author_username'}; + my $user=$ci->{'author_username'}; my $web_commit = ($ci->{'author'} =~ /\@web>/); - - if ($usershort =~ /:\/\//) { - $usershort=undef; # url; not really short + my $nickname; + + # Set nickname only if a non-url author_username is available, + # and author_name is an url. + if ($user !~ /:\/\// && defined $ci->{'author_name'} && + $ci->{'author_name'} =~ /:\/\//) { + $nickname=$user; + $user=$ci->{'author_name'}; } # compatability code for old web commit messages @@ -626,7 +630,7 @@ sub rcs_recentchanges ($) { push @rets, { rev => $sha1, user => $user, - usershort => $usershort, + nickname => $nickname, committype => $web_commit ? "web" : "git", when => $when, message => [@messages], |