git: Fix bug involving attempting to web revert a commit that included changes to...
authorJoey Hess <joey@kitenet.net>
Thu, 30 Dec 2010 00:19:58 +0000 (20:19 -0400)
committerJoey Hess <joey@kitenet.net>
Thu, 30 Dec 2010 00:19:58 +0000 (20:19 -0400)
IkiWiki/Plugin/git.pm
debian/changelog

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 ($) {
index bf092d012a38827b38c07d6cfaa2755ce9f28506..430a14eb720b626f020cc5e6c2b8f87a59184ad3 100644 (file)
@@ -27,6 +27,8 @@ ikiwiki (3.20101202) UNRELEASED; urgency=low
     is not supported). Closes: #605779 (David Bremner)
   * Add a second parameter to the rcs_diff hook, and avoid bloating memory
     reading in enormous commits.
+  * git: Fix bug involving attempting to web revert a commit that included
+    changes to attachments.
 
  -- Joey Hess <joeyh@debian.org>  Mon, 29 Nov 2010 14:44:13 -0400