blob: 3e76bdb85136f78b5532af7eefa8210f4fbfbc1f [file] [log] [blame] [view]
Edwin Kempincb188a22013-09-11 13:23:14 +02001@PLUGIN@ Configuration
2======================
3
4By configuration it is possible to specify which download schemes and
5commands are enabled.
6
7The configuration must be done in the `gerrit.config` of the Gerrit
8server.
9
10### <a id="download">Section download</a>
11
12```
13[download]
14 command = checkout
15 command = cherry_pick
16 command = pull
17 command = format_patch
18 scheme = ssh
19 scheme = http
20 scheme = anon_http
21 scheme = anon_git
22 scheme = repo_download
23```
24
25The download section configures the allowed download methods.
26
27<a id="download.command">download.command</a>
28: Commands that should be offered to download changes.
29
30 Multiple commands are supported:
31
32 * `checkout`: Command to fetch and checkout the patch set.
33
34 * `cherry_pick`: Command to fetch the patch set and cherry-pick
35 it onto the current commit.
36
37 * `pull`: Command to pull the patch set.
38
39 * `format_patch`: Command to fetch the patch set and feed it
40 into the `format-patch` command.
41
42 If `download.command` is not specified, all download commands are
43 offered.
44
45<a id="download.scheme">download.scheme</a>
46: Schemes that should be used to download changes.
47
48 Multiple schemes are supported:
49
50 * `http`: Authenticated HTTP download is allowed.
51
52 * `ssh`: Authenticated SSH download is allowed.
53
54 * `anon_http`: Anonymous HTTP download is allowed.
55
56 * `anon_git`: Anonymous Git download is allowed. This is not
57 default, it is also necessary to set [gerrit.canonicalGitUrl]
58 (../../../Documentation/config-gerrit.html#gerrit.canonicalGitUrl)
59 variable.
60
61 * `repo_download`: Gerrit advertises patch set downloads with the
62 `repo download` command, assuming that all projects managed by this
63 instance are generally worked on with the repo multi-repository
64 tool. This is not default, as not all instances will deploy repo.
65
66 If `download.scheme` is not specified, SSH, HTTP and Anonymous HTTP
67 downloads are allowed.
Edwin Kempin334f7252015-07-02 08:13:41 +020068
69<a id="download.checkForHiddenChangeRefs">download.checkForHiddenChangeRefs</a>
70: Whether the download commands should be adapted when the change
71 refs are hidden.
72
73 Git has a configuration option to hide refs from the initial
74 advertisement (`uploadpack.hideRefs`). This option can be used to
75 hide the change refs from the client. As consequence fetching
76 changes by change ref does not work anymore. However by setting
77 `uploadpack.allowTipSha1InWant` to `true` fetching changes by
78 commit ID is possible. If `download.checkForHiddenChangeRefs` is
79 set to `true` the git download commands use the commit ID instead
80 of the change ref when a project is configured like this.
81
82 Example git configuration on a project:
83
84 [uploadpack]
85 hideRefs = refs/changes/
86 hideRefs = refs/cache-automerge/
87 allowTipSha1InWant = true
88
89 By default `false`.