Merge branch 'master' into cvs
authorJoey Hess <joey@gnu.kitenet.net>
Thu, 10 Sep 2009 20:18:23 +0000 (16:18 -0400)
committerJoey Hess <joey@gnu.kitenet.net>
Thu, 10 Sep 2009 20:18:23 +0000 (16:18 -0400)
1  2 
IkiWiki/Receive.pm
IkiWiki/Wrapper.pm

Simple merge
index 0baf112ffd722c3ca133c92be2dd5982e01801ab,ff110b5ffb9763cb5fbb9248c0b5d95bc52fb5e1..53ac5099ac1e197ecac11f0cbbf09562a3aeed91
@@@ -37,16 -37,10 +37,13 @@@ sub gen_wrapper () 
                addenv("$var", s);
  EOF
        }
-       my $test_receive="";
-       if ($config{test_receive}) {
-               require IkiWiki::Receive;
-               $test_receive=IkiWiki::Receive::gen_wrapper();
-       }
+       
+       my @wrapper_hooks;
+       run_hooks(genwrapper => sub { push @wrapper_hooks, shift->() });
  
 +      my $check_args="        return 0;";
 +      run_hooks(wrapperargcheck => sub { $check_args = shift->(); });
 +
        my $check_commit_hook="";
        my $pre_exec="";
        if ($config{post_commit}) {
@@@ -126,11 -116,8 +123,11 @@@ $check_arg
  int main (int argc, char **argv) {
        char *s;
  
 +      if (!checkargs(argc, argv))
 +              exit(0);
 +
  $check_commit_hook
- $test_receive
+ @wrapper_hooks
  $envsave
        newenviron[i++]="HOME=$ENV{HOME}";
        newenviron[i++]="WRAPPED_OPTIONS=$configstring";