]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
tag: default to tag_autocreate_commit=1 as intended
authorSimon McVittie <smcv@debian.org>
Sun, 26 Dec 2010 22:19:58 +0000 (22:19 +0000)
committerSimon McVittie <smcv@debian.org>
Fri, 7 Jan 2011 20:11:38 +0000 (20:11 +0000)
IkiWiki/Plugin/tag.pm

index e4c8a11553a116d9fd400cbda39310208417a148..13dabce0c16cef34b85eab82fcc8c6c9aab2af54 100644 (file)
@@ -7,6 +7,7 @@ use strict;
 use IkiWiki 3.00;
 
 sub import {
+       hook(type => "checkconfig", id => "tag", call => \&checkconfig);
        hook(type => "getopt", id => "tag", call => \&getopt);
        hook(type => "getsetup", id => "tag", call => \&getsetup);
        hook(type => "preprocess", id => "tag", call => \&preprocess_tag, scan => 1);
@@ -53,6 +54,12 @@ sub getsetup () {
                },
 }
 
+sub checkconfig () {
+       if (! defined $config{tag_autocreate_commit}) {
+               $config{tag_autocreate_commit} = 1;
+       }
+}
+
 sub taglink ($) {
        my $tag=shift;