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.