]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Plugin/git.pm
untaint and linkpage the page name used in attachment holding directory
[ikiwiki.git] / IkiWiki / Plugin / git.pm
index 52b2bbd506b39baced0a4144405da4e335792dc4..cf7fbe9b7c43ee53180612d0411e6202074fb9e0 100644 (file)
@@ -679,6 +679,7 @@ sub rcs_diff ($;$) {
                return if defined $maxlines && @lines == $maxlines;
                push @lines, $line."\n"
                        if (@lines || $line=~/^diff --git/);
+               return 1;
        };
        safe_git(undef, $addlines, "git", "show", $sha1);
        if (wantarray) {
@@ -859,9 +860,8 @@ sub rcs_preprevert ($) {
        # in order to see all changes.
        my ($subdir, $rootdir) = git_find_root();
        $git_dir=$rootdir;
-       my @commits=git_commit_info($sha1, 1);
-       $git_dir=undef;
 
+       my @commits=git_commit_info($sha1, 1);
        if (! @commits) {
                error "unknown commit"; # just in case
        }
@@ -872,7 +872,10 @@ sub rcs_preprevert ($) {
                error gettext("you are not allowed to revert a merge");
        }
 
-       return git_parse_changes(@commits);
+       my @ret=git_parse_changes(@commits);
+
+       $git_dir=undef;
+       return @ret;
 }
 
 sub rcs_revert ($) {