pub struct MergeCommand {
pub executor: CommandExecutor,
pub commits: Vec<String>,
pub no_ff: bool,
pub ff_only: bool,
pub squash: bool,
pub commit: bool,
pub no_commit: bool,
pub message: Option<String>,
pub strategy: Option<String>,
pub abort: bool,
pub cont: bool,
pub quiet: bool,
}Expand description
Builder for git merge.
Fields§
§executor: CommandExecutorShared executor.
commits: Vec<String>Commits/branches to merge.
no_ff: bool--no-ff.
ff_only: bool--ff-only.
squash: bool--squash.
commit: bool--commit.
no_commit: bool--no-commit.
message: Option<String>-m.
strategy: Option<String>--strategy.
abort: bool--abort.
cont: bool--continue.
quiet: bool--quiet.
Implementations§
Source§impl MergeCommand
impl MergeCommand
Sourcepub fn commit_ref(&mut self, c: impl Into<String>) -> &mut Self
pub fn commit_ref(&mut self, c: impl Into<String>) -> &mut Self
Add a commit to merge.
Trait Implementations§
Source§impl Clone for MergeCommand
impl Clone for MergeCommand
Source§fn clone(&self) -> MergeCommand
fn clone(&self) -> MergeCommand
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 moreSource§impl Debug for MergeCommand
impl Debug for MergeCommand
Source§impl Default for MergeCommand
impl Default for MergeCommand
Source§fn default() -> MergeCommand
fn default() -> MergeCommand
Returns the “default value” for a type. Read more
Source§impl GitCommand for MergeCommand
impl GitCommand for MergeCommand
Source§type Output = CommandOutput
type Output = CommandOutput
The typed output produced by this command.
Source§fn get_executor(&self) -> &CommandExecutor
fn get_executor(&self) -> &CommandExecutor
Borrow the shared executor.
Source§fn get_executor_mut(&mut self) -> &mut CommandExecutor
fn get_executor_mut(&mut self) -> &mut CommandExecutor
Mutably borrow the shared executor.
Source§fn build_command_args(&self) -> Vec<String>
fn build_command_args(&self) -> Vec<String>
Build the full argument vector (subcommand + flags + positionals)
excluding the leading
git program.Source§fn execute<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<CommandOutput>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn execute<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<CommandOutput>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Run the command and decode its output into
Self::Output.Source§fn execute_raw<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<CommandOutput>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn execute_raw<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<CommandOutput>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Spawn
git with the given arguments and return the raw output. Read moreSource§fn current_dir<P: Into<PathBuf>>(&mut self, dir: P) -> &mut Self
fn current_dir<P: Into<PathBuf>>(&mut self, dir: P) -> &mut Self
Run
git in the given working directory.Source§fn env<K: Into<OsString>, V: Into<OsString>>(
&mut self,
key: K,
value: V,
) -> &mut Self
fn env<K: Into<OsString>, V: Into<OsString>>( &mut self, key: K, value: V, ) -> &mut Self
Set an environment variable for this invocation.
Source§fn with_timeout(&mut self, timeout: Duration) -> &mut Self
fn with_timeout(&mut self, timeout: Duration) -> &mut Self
Cap execution time. On expiry the process is killed and
Error::Timeout is returned.Source§fn with_timeout_secs(&mut self, seconds: u64) -> &mut Self
fn with_timeout_secs(&mut self, seconds: u64) -> &mut Self
Convenience: set timeout in whole seconds.
Auto Trait Implementations§
impl Freeze for MergeCommand
impl RefUnwindSafe for MergeCommand
impl Send for MergeCommand
impl Sync for MergeCommand
impl Unpin for MergeCommand
impl UnsafeUnpin for MergeCommand
impl UnwindSafe for MergeCommand
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