aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 => {