The string to match might not be "New directory" exactly, so match that
[ikiwiki.git] / IkiWiki / Wrapper.pm
index 6555fe625f8e542e786f3b6d7d05a72772ea207f..87c2ffc89f0e9543c6ed8d095a8a7ae73921ab05 100644 (file)
@@ -44,6 +44,17 @@ EOF
                $test_receive=IkiWiki::Receive::gen_wrapper();
        }
 
+       my $check_cvs_add_dir="";
+       # XXX conditionalize on $config{rcs} eq 'cvs'
+       $check_cvs_add_dir=<<"EOF";
+       {
+               int j;
+               for (j = 1; j < argc; j++)
+                       if (strstr(argv[j], "New directory") != NULL)
+                               exit(0);
+       }
+EOF
+
        my $check_commit_hook="";
        my $pre_exec="";
        if ($config{post_commit}) {
@@ -119,6 +130,7 @@ addenv(char *var, char *val) {
 int main (int argc, char **argv) {
        char *s;
 
+$check_cvs_add_dir
 $check_commit_hook
 $test_receive
 $envsave