]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Plugin/git.pm
Pass HTTPS variable through the wrapper so that CGI->https can be used by plugins...
[ikiwiki.git] / IkiWiki / Plugin / git.pm
index b6ad43167eff6d77c3d06f5c8c0e5c548005b7b0..14b0ab2851dc03b561e4c86e9e0c5d660a8ca3a2 100644 (file)
@@ -42,10 +42,14 @@ sub checkconfig () { #{{{
 
 sub getsetup () { #{{{
        return
+               plugin => {
+                       safe => 0, # rcs plugin
+                       rebuild => undef,
+               },
                git_wrapper => {
                        type => "string",
                        example => "/git/wiki.git/hooks/post-update",
-                       description => "git post-update hook to generate",
+                       description => "git hook to generate",
                        safe => 0, # file
                        rebuild => 0,
                },
@@ -304,13 +308,16 @@ sub parse_diff_tree ($@) { #{{{
                        my $sha1_to = shift(@tmp);
                        my $status = shift(@tmp);
 
+                       # git does not output utf-8 filenames, but instead
+                       # double-quotes them with the utf-8 characters
+                       # escaped as \nnn\nnn.
                        if ($file =~ m/^"(.*)"$/) {
                                ($file=$1) =~ s/\\([0-7]{1,3})/chr(oct($1))/eg;
                        }
                        $file =~ s/^\Q$prefix\E//;
                        if (length $file) {
                                push @{ $ci{'details'} }, {
-                                       'file'      => decode_utf8($file),
+                                       'file'      => decode("utf8", $file),
                                        'sha1_from' => $sha1_from[0],
                                        'sha1_to'   => $sha1_to,
                                };