1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# Pygitweb Routes (Gitweb actions)
Routes are implemented as FastAPI path operations. Path info is parsed from path params and query.
## No project required
| Action | Method | Path / Query | Handler |
|----------------|--------|---------------------------------------|------------------|
| project_list | GET | `/` | git_project_list |
| project_index | GET | `/?a=project_index` | git_project_index|
| opml | GET | `/?a=opml` | git_opml |
## Project required
| Action | Method | Path / Query | Handler |
|----------------|--------|---------------------------------------|------------------|
| summary | GET | `/{project}` or `/{project}/?a=summary` | git_summary |
| log | GET | `/{project}/log/{hash}` | git_log |
| shortlog | GET | `/{project}/shortlog/{hash}` | git_shortlog |
| history | GET | `/{project}/history/{hash}` or `/{hash}/path` | git_history |
| commit | GET | `/{project}/commit/{hash}` | git_commit |
| commitdiff | GET | `/{project}/commitdiff/{hash}` | git_commitdiff |
| commitdiff_plain | GET | `/{project}/commitdiff/{hash}` (Accept: patch) | git_commitdiff_plain |
| patch | GET | `/{project}/patch/{hash}` | git_patch |
| patches | GET | `/{project}/patches/{hash}` | git_patches |
| tree | GET | `/{project}/tree/{hash}` or `/{hash}/path/` | git_tree |
| blob | GET | `/{project}/blob/{hash}/path` | git_blob |
| blob_plain | GET | `/{project}/blob/{hash}/path` (raw) | git_blob_plain |
| blobdiff | GET | `/{project}/blobdiff/{hash_base}..{hash}/path` | git_blobdiff |
| blobdiff_plain | GET | same, raw | git_blobdiff_plain |
| blame | GET | `/{project}/blame/{hash}/path` | git_blame |
| blame_incremental | GET | (incremental) | git_blame_incremental |
| blame_data | GET | (JSON) | git_blame_data |
| tags | GET | `/{project}/tags` | git_tags |
| tag | GET | `/{project}/tag/{hash}` | git_tag |
| heads | GET | `/{project}/heads` | git_heads |
| remotes | GET | `/{project}/remotes` | git_remotes |
| search | GET | `/{project}/search` | git_search |
| search_help | GET | `/{project}/search_help` | git_search_help |
| snapshot | GET | `/{project}/snapshot/{hash}.{ext}` | git_snapshot |
| object | GET | (dispatch by object type when only hash) | git_object |
| forks | GET | `/{project}/forks` | git_forks |
| rss | GET | `/{project}/rss` | git_rss |
| atom | GET | `/{project}/atom` | git_atom |
| feed | GET | (rss/atom dispatcher) | git_feed |
## Query parameter short names (CGI mapping)
- `p` → project
- `a` → action
- `f` → file_name
- `fp` → file_parent
- `h` → hash
- `hp` → hash_parent
- `hb` → hash_base
- `hpb` → hash_parent_base
- `pg` → page
- `o` → order
- `s` → searchtext
- `st` → searchtype
- `sf` → snapshot_format
- `opt` → extra_options
- `sr` → search_use_regexp
- `by_tag` → ctag
- `ds` → diff_style
- `pf` → project_filter