aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <smcv@debian.org>2016-12-29 20:46:20 +0000
committerSimon McVittie <smcv@debian.org>2016-12-29 20:46:38 +0000
commitd092b0b77701a4c5cd9c8464b774a6a1da1f02cd (patch)
treef07778ed3e3d6e25076a29bb2a791cc6ae14c9bf
parentafda05479645ccf64bc2cb534d023c5a8cb0a5ae (diff)
downloadikiwiki-d092b0b77701a4c5cd9c8464b774a6a1da1f02cd.tar
ikiwiki-d092b0b77701a4c5cd9c8464b774a6a1da1f02cd.tar.gz
git: Do not disable commit hook for temporary working tree
We exclude .git/hooks from symlinking into the temporary working tree, which avoids the commit hook being run for the temporary branch anyway. This avoids the wiki not being updated if an orthogonal change is received in process A, while process B prepares a revert that is subsequently cancelled.
-rw-r--r--IkiWiki/Plugin/git.pm4
-rw-r--r--debian/changelog1
2 files changed, 1 insertions, 4 deletions
diff --git a/IkiWiki/Plugin/git.pm b/IkiWiki/Plugin/git.pm
index 3248f9d8f..c9378af87 100644
--- a/IkiWiki/Plugin/git.pm
+++ b/IkiWiki/Plugin/git.pm
@@ -1038,10 +1038,6 @@ sub rcs_preprevert ($) {
my $failure;
my @ret;
eval {
- IkiWiki::disable_commit_hook();
- push @undo, sub {
- IkiWiki::enable_commit_hook();
- };
my $branch = "ikiwiki_revert_${sha1}"; # supposed to be unique
push @undo, sub {
diff --git a/debian/changelog b/debian/changelog
index 92d1b5697..7eb10caf3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@ ikiwiki (3.20161229.1) UNRELEASED; urgency=medium
* git: Attribute reverts to the user doing the revert, not the wiki
itself.
+ * git: Do not disable the commit hook while preparing a revert.
-- Simon McVittie <smcv@debian.org> Thu, 29 Dec 2016 20:35:51 +0000