chiark / gitweb /
debian/: Working on new packaging arrangements
[userv-utils.git] / git-daemon / git-urlmap
index 61c376cbe9328f4dfc340acb63e825ffa4350202..80a1f3c00ac052e8682937975444582fd9010f24 100644 (file)
@@ -1,27 +1,35 @@
-# Example configuration file for the userv git daemon.
-#
-# This was written by Tony Finch <dot@dotat.at>
-# You may do anything with it, at your own risk.
-# http://creativecommons.org/publicdomain/zero/1.0/
-
-if ($host eq 'git.chiark.greenend.org.uk') {
-    if ($path =~ m{^~([^/]*)/(.*)}) {
-        $user = $1;
-        $dir = 'public-git';
-        $repo = $2;
-    } else {
-        $user = 'webmaster';
-        $dir = '/u2/git-repos';
-        $repo = $path;
-    }
-} elsif (m{^git://cabal[.]greenend[.]org[.]uk/~([^/]*)/(.*)$}) {
-    $user = $1;
-    $dir = 'cabal-git';
-    $repo = $2;
-} elsif ($host eq 'dotat.at') {
-    $user = 'fanf';
-    $dir = 'public-git';
-    $repo = $path;
-}
+# Each line is one of:
+# 
+#     single-user <vhost>[/<vsubpath>] <user> [<directory>]
+#           matching requests will be handled by <user>
+#           and unless overridden by <user> handled by
+#           serving subdirectories of <directory>
+# 
+#     multi-user <vhost>[/<vsubpath>] <directory>
+#           matching requests are only those those next
+#           path element starts with ~<user>.  The
+#           request will be handled by <user> and unless
+#           overridden by <user> will be handled by
+#           serving subdirectories of <directory>
+#           (<directory> must be a relative path)
+# 
+#     repo-regexp <regexp>
+#           For per-user service.  Subrepos must match this
+#           regexp, which must contain a single matching
+#           group which is the filesystem pathname inside
+#           the <directory>.  The default is:
+#     repo-regexp ^(w[-+._0-9A-Za-z]*/?\.git)$
+# 
+#     [no-]require-git-daemon-export-ok
+#           For per-user service.  Default is no-.
+# 
+# Last match, or last setting, wins.
+# <vsubpath>s may start with ~
 
-# end
+# here is an example, taken from chiark:
+#
+# single-user dotat.at                   fanf      dotat-git
+# single-user git.chiark.greenend.org.uk webmaster /u2/git-repos
+#
+# multi-user       cabal.greenend.org.uk           cabal-git
+# multi-user  git.chiark.greenend.org.uk           public-git