aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-07-26 18:29:33 -0400
committerJoey Hess <joey@kodama.kitenet.net>2008-07-26 18:29:33 -0400
commit2bbe1bf9af4ba20f28a17d5e16a467313d2e37bd (patch)
tree395f7ec18e791694980c0c098eca272da59d9c44
parent90b310b93c3dc3c9e7142fc8d1e0c8c7562659b2 (diff)
downloadikiwiki-2bbe1bf9af4ba20f28a17d5e16a467313d2e37bd.tar
ikiwiki-2bbe1bf9af4ba20f28a17d5e16a467313d2e37bd.tar.gz
move more settings out to rcs
-rw-r--r--IkiWiki.pm33
-rw-r--r--IkiWiki/Rcs/git.pm9
2 files changed, 9 insertions, 33 deletions
diff --git a/IkiWiki.pm b/IkiWiki.pm
index 76f1292fc..5724518da 100644
--- a/IkiWiki.pm
+++ b/IkiWiki.pm
@@ -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,
diff --git a/IkiWiki/Rcs/git.pm b/IkiWiki/Rcs/git.pm
index 7c3ae9276..bcf317002 100644
--- a/IkiWiki/Rcs/git.pm
+++ b/IkiWiki/Rcs/git.pm
@@ -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 => {