pub struct AddCommand {
pub executor: CommandExecutor,
pub paths: Vec<String>,
pub all: bool,
pub update: bool,
pub force: bool,
pub dry_run: bool,
pub verbose: bool,
pub intent_to_add: bool,
pub patch: bool,
pub ignore_errors: bool,
}Expand description
Builder for git add.
Fields§
§executor: CommandExecutorShared executor.
paths: Vec<String>Pathspecs to add. . or -A is common.
all: bool--all / -A.
update: bool--update / -u.
force: bool--force / -f.
dry_run: bool--dry-run / -n.
verbose: bool--verbose / -v.
intent_to_add: bool--intent-to-add / -N.
patch: bool--patch / -p.
ignore_errors: bool--ignore-errors.
Implementations§
Source§impl AddCommand
impl AddCommand
Sourcepub fn intent_to_add(&mut self) -> &mut Self
pub fn intent_to_add(&mut self) -> &mut Self
Record only that a path will be added later.
Sourcepub fn ignore_errors(&mut self) -> &mut Self
pub fn ignore_errors(&mut self) -> &mut Self
Continue past files that cannot be added.
Trait Implementations§
Source§impl Clone for AddCommand
impl Clone for AddCommand
Source§fn clone(&self) -> AddCommand
fn clone(&self) -> AddCommand
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 AddCommand
impl Debug for AddCommand
Source§impl Default for AddCommand
impl Default for AddCommand
Source§fn default() -> AddCommand
fn default() -> AddCommand
Returns the “default value” for a type. Read more
Source§impl GitCommand for AddCommand
impl GitCommand for AddCommand
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 AddCommand
impl RefUnwindSafe for AddCommand
impl Send for AddCommand
impl Sync for AddCommand
impl Unpin for AddCommand
impl UnsafeUnpin for AddCommand
impl UnwindSafe for AddCommand
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