]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
git: Do not disable commit hook for temporary working tree
authorSimon McVittie <smcv@debian.org>
Thu, 29 Dec 2016 20:46:20 +0000 (20:46 +0000)
committerSimon McVittie <smcv@debian.org>
Thu, 29 Dec 2016 20:46:38 +0000 (20:46 +0000)
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.

IkiWiki/Plugin/git.pm
debian/changelog

index 3248f9d8fda71f915fc30f8db6b2cfb5deac08ed..c9378af8771ab3070ac61b0c6ff55aa9608dbbb1 100644 (file)
@@ -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 {
index 92d1b56973baf7b5bd214d00a4b076f7c44242b9..7eb10caf3ef43d94a772b1362c7dfaeb9b12cb2a 100644 (file)
@@ -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