]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
git: Do not disable commit hook for temporary working tree
authorSimon McVittie <smcv@debian.org>
Wed, 11 Jan 2017 15:33:21 +0000 (15:33 +0000)
committerSimon McVittie <smcv@debian.org>
Wed, 11 Jan 2017 19:55:10 +0000 (19:55 +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.

(cherry picked from commit d092b0b77701a4c5cd9c8464b774a6a1da1f02cd)

IkiWiki/Plugin/git.pm

index c976ca9a2e22cfdd3e154cbaddd5f3bfb6375f4d..7a6a554952079787f8d5c15b4c4f74159812d1c9 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 {