pub struct AtomicPushSpec<'a> {
pub remote: &'a str,
pub branch: Option<&'a str>,
pub tags: &'a [String],
pub dry_run: bool,
pub strict: bool,
}Expand description
Inputs to push_branch_and_tags_atomic_in.
Groups the push target (remote + optional branch), the tags to push,
and the dry_run / strict toggles so the public helper reads cleanly at
call sites instead of carrying a long positional argument list.
Ref combinations the helper accepts:
branch = Some+ non-emptytags→git push --atomic <remote> HEAD:refs/heads/<branch> <tags…>branch = Some+ emptytags→git push <remote> HEAD:refs/heads/<branch>branch = None+ non-emptytags→git push --atomic <remote> <tags…>branch = None+ emptytags→ no-op (logs a warning)
Fields§
§remote: &'a strRemote name to push to (e.g. "origin").
branch: Option<&'a str>Branch to push HEAD to as refs/heads/<branch>, or None to push tags only.
Tags to push.
dry_run: boolWhen true, log the would-run push instead of executing it.
strict: boolWhen true, a missing remote is an error rather than a skipped no-op.
Trait Implementations§
Source§impl<'a> Clone for AtomicPushSpec<'a>
impl<'a> Clone for AtomicPushSpec<'a>
Source§fn clone(&self) -> AtomicPushSpec<'a>
fn clone(&self) -> AtomicPushSpec<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<'a> Freeze for AtomicPushSpec<'a>
impl<'a> RefUnwindSafe for AtomicPushSpec<'a>
impl<'a> Send for AtomicPushSpec<'a>
impl<'a> Sync for AtomicPushSpec<'a>
impl<'a> Unpin for AtomicPushSpec<'a>
impl<'a> UnsafeUnpin for AtomicPushSpec<'a>
impl<'a> UnwindSafe for AtomicPushSpec<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more