chiark / gitweb /
git-urlmap: clarify comments
[userv-utils.git] / git-daemon / git-urlmap
1 # Configuration file for the userv git daemon.
2 #
3 # This was written by Tony Finch <dot@dotat.at>
4 # You may do anything with it, at your own risk.
5 # http://creativecommons.org/publicdomain/zero/1.0/
6 #
7 # This is a perl script which is expected to turn the information
8 # found in the request variables into the location of the
9 # corresponding repository, which it stores in the output variables.
10 # Some information about the network connection is also available.
11 #
12 # REQUEST VARIABLES
13 #  $service - normally "git-upload-pack"
14 #    `git daemon --help` describes other possible services
15 #  $host
16 #  $path
17 #  $uri     = git://$host/$path
18 #  $_       = $uri
19 #
20 # OUTPUT VARIABLES
21 #  $user - who runs the service
22 #  $dir  - may be:
23 #    * an absolute path
24 #    * a path relative to the user's home directory
25 #    * equivalently, a path starting ~/
26 #  $repo - if set, the repository's path is $dir/$repo
27 #          otherwise, the repository's path is just $dir
28 #  $check_export - whether to check for a git-daemon-export-ok file
29 #                  (default false)
30 #  $check_repo   - whether to restrict the syntax of $repo
31 #                  (default true)
32 #  @opts - options for the service command
33 #
34 # CONNECTION VARIABLES
35 #  $client_addr
36 #  $client_port
37 #  $client      = [$client_addr]:$client_port
38 #  $server_addr
39 #  $server_port
40 #  $server      = [$server_addr]:$server_port
41
42 if ($path =~ m{^~([^/]*)/(.*)}) {
43     $user = $1;
44     $dir = 'public-git';
45     $repo = $2;
46 }
47
48 # end