move more settings out to rcs
authorJoey Hess <joey@kodama.kitenet.net>
Sat, 26 Jul 2008 22:29:33 +0000 (18:29 -0400)
committerJoey Hess <joey@kodama.kitenet.net>
Sat, 26 Jul 2008 22:29:33 +0000 (18:29 -0400)
IkiWiki.pm
IkiWiki/Rcs/git.pm

index 76f1292fcde39abc85a1fca3a3a5af7c0b56d3c5..5724518dae74e9d8418dc0a235b51388d3b05433 100644 (file)
@@ -94,25 +94,6 @@ sub getsetup () { #{{{
                safe => 0, # don't allow overriding
                rebuild => 0,
        },
-       historyurl => {
-               type => "string",
-               # TODO should be set per-rcs to allow different
-               # examples and descriptions
-               default => '',
-               example => "XXX",
-               description => "XXX",
-               safe => 1,
-               rebuild => 1,
-       },
-       diffurl => {
-               type => "string",
-               # TODO ditto above
-               default => '',
-               example => "XXX",
-               description => "XXX",
-               safe => 1,
-               rebuild => 1,
-       },
        discussion => {
                type => "boolean",
                default => 1,
@@ -120,20 +101,6 @@ sub getsetup () { #{{{
                safe => 1,
                rebuild => 1,
        },
-       gitorigin_branch => {
-               type => "string",
-               default => "origin",
-               description => "the git origin to pull from",
-               safe => 0, # paranoia
-               rebuild => 0,
-       },
-       gitmaster_branch => {
-               type => "string",
-               default => "master",
-               description => "the git master branch",
-               safe => 0, # paranoia
-               rebuild => 0,
-       },
        wrappers => {
                type => "string",
                default => undef,
index 7c3ae9276edc3c924831ecc3ae246181cb89f846..bcf3170020fb707c4b8f34245b7ee1421807e152 100644 (file)
@@ -11,6 +11,15 @@ use open qw{:utf8 :std};
 my $sha1_pattern     = qr/[0-9a-fA-F]{40}/; # pattern to validate Git sha1sums
 my $dummy_commit_msg = 'dummy commit';      # message to skip in recent changes
 
+hook(type => "checkconfig", id => "git", call => sub { #{{{
+       if (! defined $config{gitorigin_branch}) {
+               $config{gitorigin_branch}="origin";
+       }
+       if (! defined $config{gitmaster_branch}) {
+               $config{gitmaster_branch}="master";
+       }
+}); #}}}
+
 hook(type => "getsetup", id => "git", call => sub { #{{{
        return
                historyurl => {