gitwrap/push/options.rs
1// Warning!! Code generated automatically: this file must not be edited by hand
2use crate::option_arg;
3use crate::wrap_command::FnOptionArg;
4
5pub const ALL: &str = "--all";
6pub const PRUNE: &str = "--prune";
7pub const MIRROR: &str = "--mirror";
8pub const DRY_RUN: &str = "--dry-run";
9pub const PORCELAIN: &str = "--porcelain";
10pub const DELETE: &str = "--delete";
11pub const TAGS: &str = "--tags";
12pub const FOLLOW_TAGS: &str = "--follow-tags";
13pub const SIGNED: &str = "--signed";
14pub const NO_SIGNED: &str = "--no-signed";
15pub const SIGN: &str = "--sign";
16pub const ATOMIC: &str = "--atomic";
17pub const NO_ATOMIC: &str = "--no-atomic";
18pub const PUSH_OPTION: &str = "--push-option";
19pub const RECEIVE_PACK: &str = "--receive-pack";
20pub const EXEC: &str = "--exec";
21pub const FORCE: &str = "--force";
22pub const REPO: &str = "--repo";
23pub const SET_UPSTREAM: &str = "--set-upstream";
24pub const THIN: &str = "--thin";
25pub const NO_THIN: &str = "--no-thin";
26pub const QUIET: &str = "--quiet";
27pub const VERBOSE: &str = "--verbose";
28pub const PROGRESS: &str = "--progress";
29pub const NO_RECURSE_SUBMODULES: &str = "--no-recurse-submodules";
30pub const RECURSE_SUBMODULES: &str = "--recurse-submodules";
31pub const VERIFY: &str = "--verify";
32pub const NO_VERIFY: &str = "--no-verify";
33pub const IPV4: &str = "--ipv4";
34pub const IPV6: &str = "--ipv6";
35
36/// Push all branches (i.e.
37/// refs under refs/heads/); cannot be used with other <refspec>.
38/// --all
39pub fn all() -> FnOptionArg {
40 option_arg::simple(ALL)
41}
42
43/// Remove remote branches that don’t have a local counterpart.
44/// For example a remote branch tmp will be removed if a local branch with the same name doesn’t exist any more.
45/// This also respects refspecs, e.g.
46/// git push --prune remote refs/heads/*:refs/tmp/* would make sure that remote refs/tmp/foo will be removed if refs/heads/foo doesn’t exist.
47/// --prune
48pub fn prune() -> FnOptionArg {
49 option_arg::simple(PRUNE)
50}
51
52/// Instead of naming each ref to push, specifies that all refs under refs/ (which includes but is not limited to refs/heads/, refs/remotes/, and refs/tags/) be mirrored to the remote repository.
53/// Newly created local refs will be pushed to the remote end, locally updated refs will be force updated on the remote end, and deleted refs will be removed from the remote end.
54/// This is the default if the configuration option remote.<remote>.mirror is set.
55/// --mirror
56pub fn mirror() -> FnOptionArg {
57 option_arg::simple(MIRROR)
58}
59
60/// Do everything except actually send the updates.
61/// -n, --dry-run
62pub fn dry_run() -> FnOptionArg {
63 option_arg::simple(DRY_RUN)
64}
65
66/// Produce machine-readable output.
67/// The output status line for each ref will be tab-separated and sent to stdout instead of stderr.
68/// The full symbolic names of the refs will be given.
69/// --porcelain
70pub fn porcelain() -> FnOptionArg {
71 option_arg::simple(PORCELAIN)
72}
73
74/// All listed refs are deleted from the remote repository.
75/// This is the same as prefixing all refs with a colon.
76/// --delete
77pub fn delete() -> FnOptionArg {
78 option_arg::simple(DELETE)
79}
80
81/// All refs under refs/tags are pushed, in addition to refspecs explicitly listed on the command line.
82/// --tags
83pub fn tags() -> FnOptionArg {
84 option_arg::simple(TAGS)
85}
86
87/// Push all the refs that would be pushed without this option,
88/// and also push annotated tags in refs/tags that are missing from the remote but are pointing at commit-ish that are reachable from the refs being pushed.
89/// This can also be specified with configuration variable push.followTags.
90/// For more information, see push.followTags in git-config(1).
91/// --follow-tags
92pub fn follow_tags() -> FnOptionArg {
93 option_arg::simple(FOLLOW_TAGS)
94}
95
96/// GPG-sign the push request to update refs on the receiving side,
97/// to allow it to be checked by the hooks and/or be logged.
98/// If false or --no-signed, no signing will be attempted.
99/// If true or --signed, the push will fail if the server does not support signed pushes.
100/// If set to if-asked, sign if and only if the server supports signed pushes.
101/// The push will also fail if the actual call to gpg --sign fails.
102/// See git-receive-pack(1) for the details on the receiving end.
103/// --signed
104pub fn signed() -> FnOptionArg {
105 option_arg::simple(SIGNED)
106}
107
108/// GPG-sign the push request to update refs on the receiving side,
109/// to allow it to be checked by the hooks and/or be logged.
110/// If false or --no-signed, no signing will be attempted.
111/// If true or --signed, the push will fail if the server does not support signed pushes.
112/// If set to if-asked, sign if and only if the server supports signed pushes.
113/// The push will also fail if the actual call to gpg --sign fails.
114/// See git-receive-pack(1) for the details on the receiving end.
115/// --no-signed
116pub fn no_signed() -> FnOptionArg {
117 option_arg::simple(NO_SIGNED)
118}
119
120/// GPG-sign the push request to update refs on the receiving side,
121/// to allow it to be checked by the hooks and/or be logged.
122/// If false or --no-signed, no signing will be attempted.
123/// If true or --signed, the push will fail if the server does not support signed pushes.
124/// If set to if-asked, sign if and only if the server supports signed pushes.
125/// The push will also fail if the actual call to gpg --sign fails.
126/// See git-receive-pack(1) for the details on the receiving end.
127/// --sign=(true|false|if-asked)
128pub fn sign(value: &str) -> FnOptionArg {
129 option_arg::equal_optional(SIGN, value)
130}
131
132/// Use an atomic transaction on the remote side if available.
133/// Either all refs are updated, or on error, no refs are updated.
134/// If the server does not support atomic pushes the push will fail.
135/// --atomic
136pub fn atomic() -> FnOptionArg {
137 option_arg::simple(ATOMIC)
138}
139
140/// Use an atomic transaction on the remote side if available.
141/// Either all refs are updated, or on error, no refs are updated.
142/// If the server does not support atomic pushes the push will fail.
143/// --no-atomic
144pub fn no_atomic() -> FnOptionArg {
145 option_arg::simple(NO_ATOMIC)
146}
147
148/// Transmit the given string to the server, which passes them to the pre-receive as well as the post-receive hook.
149/// The given string must not contain a NUL or LF character.
150/// -o, --push-option
151pub fn push_option() -> FnOptionArg {
152 option_arg::simple(PUSH_OPTION)
153}
154
155/// Path to the git-receive-pack program on the remote end.
156/// Sometimes useful when pushing to a remote repository over ssh, and you do not have the program in a directory on the default $PATH.
157/// --receive-pack=<git-receive-pack>
158pub fn receive_pack(git_receive_pack_arg: &str) -> FnOptionArg {
159 option_arg::equal_no_optional(RECEIVE_PACK, git_receive_pack_arg)
160}
161
162/// Path to the git-receive-pack program on the remote end.
163/// Sometimes useful when pushing to a remote repository over ssh, and you do not have the program in a directory on the default $PATH.
164/// --exec=<git-receive-pack>
165pub fn exec(git_receive_pack_arg: &str) -> FnOptionArg {
166 option_arg::equal_no_optional(EXEC, git_receive_pack_arg)
167}
168
169/// Usually, the command refuses to update a remote ref that is not an ancestor of the local ref used to overwrite it.
170/// Also, when --force-with-lease option is used, the command refuses to update a remote ref whose current value does not match what is expected.
171/// -f, --force
172pub fn force() -> FnOptionArg {
173 option_arg::simple(FORCE)
174}
175
176/// This option is equivalent to the <repository> argument.
177/// If both are specified, the command-line argument takes precedence.
178/// --repo=<repository>
179pub fn repo(repository_arg: &str) -> FnOptionArg {
180 option_arg::equal_no_optional(REPO, repository_arg)
181}
182
183/// For every branch that is up to date or successfully pushed, add upstream (tracking) reference, used by argument-less git-pull(1) and other commands.
184/// For more information, see branch.<name>.merge in git-config(1).
185/// -u, --set-upstream
186pub fn set_upstream() -> FnOptionArg {
187 option_arg::simple(SET_UPSTREAM)
188}
189
190/// These options are passed to git-send-pack(1).
191/// A thin transfer significantly reduces the amount of sent data when the sender and receiver share many of the same objects in common.
192/// The default is --thin.
193/// --thin
194pub fn thin() -> FnOptionArg {
195 option_arg::simple(THIN)
196}
197
198/// These options are passed to git-send-pack(1).
199/// A thin transfer significantly reduces the amount of sent data when the sender and receiver share many of the same objects in common.
200/// The default is --thin.
201/// --no-thin
202pub fn no_thin() -> FnOptionArg {
203 option_arg::simple(NO_THIN)
204}
205
206/// Suppress all output, including the listing of updated refs, unless an error occurs.
207/// Progress is not reported to the standard error stream.
208/// -q, --quiet
209pub fn quiet() -> FnOptionArg {
210 option_arg::simple(QUIET)
211}
212
213/// Run verbosely.
214/// -v, --verbose
215pub fn verbose() -> FnOptionArg {
216 option_arg::simple(VERBOSE)
217}
218
219/// Progress status is reported on the standard error stream by default when it is attached to a terminal, unless -q is specified.
220/// This flag forces progress status even if the standard error stream is not directed to a terminal.
221/// --progress
222pub fn progress() -> FnOptionArg {
223 option_arg::simple(PROGRESS)
224}
225
226/// May be used to make sure all submodule commits used by the revisions to be pushed are available on a remote-tracking branch.
227/// If check is used Git will verify that all submodule commits that changed in the revisions to be pushed are available on at least one remote of the submodule.
228/// If any commits are missing the push will be aborted and exit with non-zero status.
229/// If on-demand is used all submodules that changed in the revisions to be pushed will be pushed.
230/// If on-demand was not able to push all necessary revisions it will also be aborted and exit with non-zero status.
231/// If only is used all submodules will be recursively pushed while the superproject is left unpushed.
232/// A value of no or using --no-recurse-submodules can be used to override the push.recurseSubmodules configuration variable when no submodule recursion is required.
233/// --no-recurse-submodules
234pub fn no_recurse_submodules() -> FnOptionArg {
235 option_arg::simple(NO_RECURSE_SUBMODULES)
236}
237
238/// May be used to make sure all submodule commits used by the revisions to be pushed are available on a remote-tracking branch.
239/// If check is used Git will verify that all submodule commits that changed in the revisions to be pushed are available on at least one remote of the submodule.
240/// If any commits are missing the push will be aborted and exit with non-zero status.
241/// If on-demand is used all submodules that changed in the revisions to be pushed will be pushed.
242/// If on-demand was not able to push all necessary revisions it will also be aborted and exit with non-zero status.
243/// If only is used all submodules will be recursively pushed while the superproject is left unpushed.
244/// A value of no or using --no-recurse-submodules can be used to override the push.recurseSubmodules configuration variable when no submodule recursion is required.
245/// --recurse-submodules=(check|on-demand|only|no)
246pub fn recurse_submodules(value: &str) -> FnOptionArg {
247 option_arg::equal_optional(RECURSE_SUBMODULES, value)
248}
249
250/// Toggle the pre-push hook (see githooks(5)).
251/// The default is --verify, giving the hook a chance to prevent the push.
252/// With --no-verify, the hook is bypassed completely.
253/// --verify
254pub fn verify() -> FnOptionArg {
255 option_arg::simple(VERIFY)
256}
257
258/// Toggle the pre-push hook (see githooks(5)).
259/// The default is --verify, giving the hook a chance to prevent the push.
260/// With --no-verify, the hook is bypassed completely.
261/// --no-verify
262pub fn no_verify() -> FnOptionArg {
263 option_arg::simple(NO_VERIFY)
264}
265
266/// Use IPv4 addresses only, ignoring IPv6 addresses.
267/// -4, --ipv4
268pub fn ipv4() -> FnOptionArg {
269 option_arg::simple(IPV4)
270}
271
272/// Use IPv6 addresses only, ignoring IPv4 addresses.
273/// -6, --ipv6
274pub fn ipv6() -> FnOptionArg {
275 option_arg::simple(IPV6)
276}