diff options
author | Joey Hess <joey@gnu.kitenet.net> | 2009-09-10 16:09:19 -0400 |
---|---|---|
committer | Joey Hess <joey@gnu.kitenet.net> | 2009-09-10 16:15:48 -0400 |
commit | 26dae8f04955915f4203fab4bd5301c959f7771a (patch) | |
tree | e109ef29617dc03bf92cc1cdba0d28b8d295ee3b /IkiWiki/Receive.pm | |
parent | 5ee980d77a614865747101615a6a795bec6f272f (diff) | |
download | ikiwiki-26dae8f04955915f4203fab4bd5301c959f7771a.tar ikiwiki-26dae8f04955915f4203fab4bd5301c959f7771a.tar.gz |
clean up use of IkiWiki::Receive
Loading and use of IkiWiki::Receive can all be pushed into the git plugin,
rather than scattered around.
I had at first wanted to make a receive plugin and move it there,
but a plugin was not a good fit; you don't want users to have to manually
load it, and making the git plugin load the receive plugin at the right
times would need more, and ugly code.
Diffstat (limited to 'IkiWiki/Receive.pm')
-rw-r--r-- | IkiWiki/Receive.pm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/IkiWiki/Receive.pm b/IkiWiki/Receive.pm index 37b6f2a62..101c13ee5 100644 --- a/IkiWiki/Receive.pm +++ b/IkiWiki/Receive.pm @@ -1,5 +1,4 @@ #!/usr/bin/perl - package IkiWiki::Receive; use warnings; @@ -20,9 +19,9 @@ sub trusted () { ! grep { $_ eq $user } @{$config{untrusted_committers}}; } -sub gen_wrapper () { +sub genwrapper () { # Test for commits from untrusted committers in the wrapper, to - # avoid loading ikiwiki at all for trusted commits. + # avoid starting ikiwiki proper at all for trusted commits. my $ret=<<"EOF"; { @@ -37,6 +36,8 @@ EOF "u != $uid"; } @{$config{untrusted_committers}}). ") exit(0);\n"; + + $ret.=<<"EOF"; asprintf(&s, "CALLER_UID=%i", u); newenviron[i++]=s; |