pub struct PushCommand {
pub paths: Vec<PathBuf>,
pub all: bool,
pub dry_run: bool,
pub yes: bool,
pub output: TableOrJson,
}Expand description
Publishes worktrees’ branches to their upstreams, force-pushing with a lease where a rebase rewrote history (#1443).
The complement of RebaseCommand, and local for the same reason: the daemon
hosts the same engine behind its two-phase push op (which is what the tree
view’s Push (force-with-lease) drives), and keeping this command local is
what makes a batch push work with no daemon running at all, and keeps
--all out of the wire protocol. The git work lives in
crate::git::worktree_push; see ADR-0061, ADR-0059, ADR-0003.
There is deliberately no --force: every non-fast-forward goes out as
--force-with-lease --force-if-includes, and a refused lease is reported with
git fetch named as the fix. There is likewise no remote override — a branch
publishes to its own upstream’s remote.
A force-push publishes rewritten history, so it confirms by default
(--dry-run to preview, -y to skip the prompt) in the spirit of ADR-0027.
Fields§
§paths: Vec<PathBuf>Worktree folders to publish. Omit these and pass --all to publish every
worktree of the current repository, including its main working tree.
all: boolPublish every worktree of the current repository, including its main working tree.
dry_run: boolReport what would be published, but push nothing.
yes: boolSkip the interactive confirmation before pushing.
output: TableOrJsonOutput format.
Implementations§
Trait Implementations§
Source§impl Args for PushCommand
impl Args for PushCommand
Source§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§impl CommandFactory for PushCommand
impl CommandFactory for PushCommand
Source§impl FromArgMatches for PushCommand
impl FromArgMatches for PushCommand
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Parser for PushCommand
impl Parser for PushCommand
Source§fn parse_from<I, T>(itr: I) -> Self
fn parse_from<I, T>(itr: I) -> Self
Source§fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
Source§fn update_from<I, T>(&mut self, itr: I)
fn update_from<I, T>(&mut self, itr: I)
Auto Trait Implementations§
impl Freeze for PushCommand
impl RefUnwindSafe for PushCommand
impl Send for PushCommand
impl Sync for PushCommand
impl Unpin for PushCommand
impl UnsafeUnpin for PushCommand
impl UnwindSafe for PushCommand
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more