pub struct PushOptions {
pub atomic: bool,
pub dry_run: bool,
pub tracking_remote: Option<String>,
pub push_options: Vec<String>,
pub diagnostics: Option<DiagnosticsHandle>,
pub network_trace: bool,
pub remote_ref_tips: Option<Vec<ObjectId>>,
}Expand description
Options controlling a push.
Fields§
§atomic: boolApply all updates atomically (all-or-nothing).
dry_run: boolCompute results without writing to the remote.
tracking_remote: Option<String>When set, update refs/remotes/<name>/... in the local repo after a
successful push (matching Git’s post-push tracking ref maintenance).
push_options: Vec<String>Server-side push options to transmit (git push --push-option <value>).
When non-empty, the negotiated capability list includes push-options
and one push-option <value> pkt-line per entry is written after the
ref-update command block and before the flush/pack. The remote exposes
these to its hooks via GIT_PUSH_OPTION_COUNT / GIT_PUSH_OPTION_<n>.
If this is non-empty but the remote git-receive-pack does not advertise
the push-options capability, the push fails with
crate::error::Error::PushOptionsUnsupported (matching Git).
diagnostics: Option<DiagnosticsHandle>Diagnostic sink for crate::diagnostics::Trace::Network events.
network_trace: boolWhen true with Self::diagnostics, push paths may emit network trace events.
remote_ref_tips: Option<Vec<ObjectId>>Ref tips already read from the remote, for example while planning
(PushPlanContext::remote_tips).
A local push uses them as the objects the remote already has instead of listing the remote’s refs again; ref updates still check each destination’s current value. They must come from the push destination, or objects the destination lacks may be left out of the pack. Wire pushes read the advertisement from their connection and ignore this.