X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/2b7a003794537ebf8e02f122cc2743834b47a396..844169c9b06830df33ccde8abead015128baa496:/IkiWiki/Plugin/cvs.pm diff --git a/IkiWiki/Plugin/cvs.pm b/IkiWiki/Plugin/cvs.pm index c09e4f9aa..ac188d4a1 100644 --- a/IkiWiki/Plugin/cvs.pm +++ b/IkiWiki/Plugin/cvs.pm @@ -6,6 +6,7 @@ use strict; use IkiWiki; sub import { + hook(type => "getopt", id => "cvs", call => \&getopt); hook(type => "checkconfig", id => "cvs", call => \&checkconfig); hook(type => "getsetup", id => "cvs", call => \&getsetup); hook(type => "rcs", id => "rcs_update", call => \&rcs_update); @@ -20,6 +21,13 @@ sub import { hook(type => "rcs", id => "rcs_getctime", call => \&rcs_getctime); } +sub getopt () { + # "cvs add dir" acts immediately on the repository. + # post-commit gets confused by this and doesn't need to act on it. + # If that's why we're here, terminate the process. + ((grep /New directory/, @ARGV) > 0) && exit 0; +} + sub checkconfig () { if (! defined $config{cvspath}) { $config{cvspath}="ikiwiki";