X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/903213e63fd6c409046f66e73881aba33c3926de..b0b87d15843db10b6ff7a4e30ff8bf110e229075:/IkiWiki/Plugin/git.pm diff --git a/IkiWiki/Plugin/git.pm b/IkiWiki/Plugin/git.pm index 36674572b..14b0ab285 100644 --- a/IkiWiki/Plugin/git.pm +++ b/IkiWiki/Plugin/git.pm @@ -49,7 +49,7 @@ sub getsetup () { #{{{ 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, }, @@ -308,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, };