avoid generating receive wrapper if there are no untrusted committers
authorJoey Hess <joey@kitenet.net>
Mon, 26 Jul 2010 17:30:45 +0000 (13:30 -0400)
committerJoey Hess <joey@kitenet.net>
Mon, 26 Jul 2010 17:30:45 +0000 (13:30 -0400)
The wrapper is pointless in that configuration. Also, the code for it
doesn't compile w/o untrusted commiters to test. :)

IkiWiki/Plugin/git.pm

index 899ac4a85f32421f3a6554e726562eb293e8499c..d342a7398bd2ce4458241ccb68a5ad6879edd70e 100644 (file)
@@ -46,7 +46,9 @@ sub checkconfig () {
        }
 
        if (defined $config{git_test_receive_wrapper} &&
-           length $config{git_test_receive_wrapper}) {
+           length $config{git_test_receive_wrapper} &&
+           defined $config{untrusted_committers} &&
+           @{$config{untrusted_committers}}) {
                push @{$config{wrappers}}, {
                        test_receive => 1,
                        wrapper => $config{git_test_receive_wrapper},