]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/git.pm
meta: Fix bug in loading of HTML::Entities that can break inline archive=yes (mostly...
[git.ikiwiki.info.git] / IkiWiki / Plugin / git.pm
index cadc69e24d6f1f610bf5a6f1d93e35a20ec966b3..cf7fbe9b7c43ee53180612d0411e6202074fb9e0 100644 (file)
@@ -860,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
        }
@@ -873,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 ($) {