Merge branch 'master' into git-anon
authorJoey Hess <joey@kodama.kitenet.net>
Thu, 23 Oct 2008 18:09:01 +0000 (14:09 -0400)
committerJoey Hess <joey@kodama.kitenet.net>
Thu, 23 Oct 2008 18:09:01 +0000 (14:09 -0400)
debian/changelog
ikiwiki.in

index dfc754d65b76721f3081eaaa63800b7bfc7b2d0a..49bd854475815387e05f5b8d608711e1c7919d00 100644 (file)
@@ -31,6 +31,8 @@ ikiwiki (2.68) UNRELEASED; urgency=low
   * external: RPC functions can be injected to replace exported functions.
   * Updated Spanish translation from the ever vigilant Victor Moral.
   * Updated Danish translation from Jonas Smedegaard. Closes: #503117
+  * Optimise the no-op post-commit hook in the web edit case by skipping
+    loading plugins. (Particularly a win when using external plugins.)
 
  -- Joey Hess <joeyh@debian.org>  Fri, 17 Oct 2008 20:11:02 -0400
 
index 873bde0df49d68d0fe51e18b6ee11bc2ea4f0378..22addb46337724eecb2e50b2642c76f73d92e8bb 100755 (executable)
@@ -118,6 +118,12 @@ sub getconfig () { #{{{
                        error("WRAPPED_OPTIONS: $@");
                }
                delete $ENV{WRAPPED_OPTIONS};
+
+               # optimisation for no-op post_commit 
+               if ($config{post_commit} && ! commit_hook_enabled()) {
+                       exit 0;
+               }
+
                loadplugins();
                checkconfig();
        }