summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2010-12-29 20:19:58 -0400
committerJoey Hess <joey@kitenet.net>2010-12-29 20:19:58 -0400
commit7d0ef85d802a99c968965b4f7d4e5947b130d2b8 (patch)
treef1bc1e7ec1876c114373bb50c1535a2f0cb52eee
parent8517aa8687fe2d68f380268854929eef18abec14 (diff)
git: Fix bug involving attempting to web revert a commit that included changes to attachments.
-rw-r--r--IkiWiki/Plugin/git.pm8
-rw-r--r--debian/changelog2
2 files changed, 7 insertions, 3 deletions
diff --git a/IkiWiki/Plugin/git.pm b/IkiWiki/Plugin/git.pm
index cadc69e24..cf7fbe9b7 100644
--- a/IkiWiki/Plugin/git.pm
+++ b/IkiWiki/Plugin/git.pm
@@ -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 ($) {
diff --git a/debian/changelog b/debian/changelog
index bf092d012..430a14eb7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -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