aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/git.mdwn26
-rwxr-xr-xgitremotes29
2 files changed, 48 insertions, 7 deletions
diff --git a/doc/git.mdwn b/doc/git.mdwn
index e7f47f5a0..00c108616 100644
--- a/doc/git.mdwn
+++ b/doc/git.mdwn
@@ -16,17 +16,29 @@ Or like this if your firewall only passes http traffic (slow):
The gitweb is [here](http://git.ikiwiki.info/?p=ikiwiki).
-There is also a mirror [on github](http://github.com/joeyh/ikiwiki/tree/master).
-
Commits to this git repository are fed into [CIA](http://cia.vc), and can
be browsed, subscribed to etc on its
[project page](http://cia.vc/stats/project/ikiwiki). They're also fed into
[twitter](http://twitter.com/ikiwiki).
-## branches
+## personal git repositories
You are of course free to set up your own ikiwiki git repository with your
-own [[patches|patch]].
+own [[patches|patch]]. If you list it here, the `gitremotes` script will
+automatically add it to git remotes. Your repo will automatically be pulled
+into [[Joey]]'s working tree. This is recommended. :-)
+
+# Machine-parsed format: * wikilink <git:url>
+
+* [[github]] <git://github.com/joeyh/ikiwiki.git>
+ [browse](http://github.com/joeyh/ikiwiki/tree/master)
+ A mirror of the main repo, automatically updated.
+* [[smcv]] <git://git.pseudorandom.co.uk/git/smcv/ikiwiki.git>
+* [[intrigeri]] <git://gaffer.ptitcanardnoir.org/ikiwiki.git>
+* [[gmcmanus]] <git://github.com/gmcmanus/ikiwiki.git>
+* [[jelmer]] <git://git.samba.org/jelmer/ikiwiki.git>
+
+## branches
Some of the branches included in the main repository include:
@@ -38,9 +50,9 @@ Some of the branches included in the main repository include:
* `wikiwyg` adds [[todo/wikiwyg]] support. It is unmerged pending some
changes.
* `darcs` is being used to add darcs support.
-* `pristine-tar` contains deltas that
- [pristine-tar](http://kitenet.net/~joey/code/pristine-tar)
- can use to recreate released tarballs of ikiwiki
* `debian-stable` is used for updates to the old version included in
Debian's stable release, and `debian-testing` is used for updates to
Debian's testing release.
+* `pristine-tar` contains deltas that
+ [pristine-tar](http://kitenet.net/~joey/code/pristine-tar)
+ can use to recreate released tarballs of ikiwiki
diff --git a/gitremotes b/gitremotes
new file mode 100755
index 000000000..b14490924
--- /dev/null
+++ b/gitremotes
@@ -0,0 +1,29 @@
+#!/usr/bin/perl
+# Parses list of remotes in doc/git.mdwn, configures git to use them
+# all, and fetches updates from them.
+
+my $error=0;
+
+open (IN, "doc/git.mdwn") || die "doc/git.mdwn: $!";
+while (<IN>) {
+ if (/^\*\s+\[\[(\w+)\]\]\s+<([^>]+)>/) {
+ # note that the remote name has to be a simple word (\w)
+ # for security/sanity reasons
+ my $remote=$1;
+ my $url=$2;
+
+ # check configured url to deal with it changing
+ my $info=`git remote show -n $remote`;
+ my ($oldurl)=$info=~/URL: (.*)/m;
+ if ($oldurl ne $url) {
+ system("git remote rm $remote 2>/dev/null");
+ $error |= system("git", "remote", "add", "-f", $remote, $url);
+ }
+ else {
+ $error |= system("git", "fetch", $remote);
+ }
+ }
+}
+close IN;
+
+exit $error;