pub struct DescribeCommand {
pub executor: CommandExecutor,
pub commits: Vec<String>,
pub tags: bool,
pub all: bool,
pub always: bool,
pub long: bool,
pub dirty: Option<Option<String>>,
pub abbrev: Option<u32>,
pub match_pattern: Option<String>,
pub exclude: Option<String>,
pub first_parent: bool,
}Expand description
Builder for git describe.
Fields§
§executor: CommandExecutorShared executor.
commits: Vec<String>Commit-ish(es) to describe.
--tags include lightweight tags.
all: bool--all include all refs, not just tags.
always: bool--always fall back to abbreviated SHA when nothing matches.
long: bool--long always show the long form (tag-count-gSHA).
dirty: Option<Option<String>>--dirty[=<mark>].
abbrev: Option<u32>--abbrev=N.
match_pattern: Option<String>--match=<pattern>.
exclude: Option<String>--exclude=<pattern>.
first_parent: bool--first-parent.
Implementations§
Source§impl DescribeCommand
impl DescribeCommand
--tags.
Sourcepub fn dirty_mark(&mut self, mark: impl Into<String>) -> &mut Self
pub fn dirty_mark(&mut self, mark: impl Into<String>) -> &mut Self
--dirty=<mark>.
Sourcepub fn match_pattern(&mut self, p: impl Into<String>) -> &mut Self
pub fn match_pattern(&mut self, p: impl Into<String>) -> &mut Self
--match=<pattern>.
Sourcepub fn first_parent(&mut self) -> &mut Self
pub fn first_parent(&mut self) -> &mut Self
--first-parent.
Trait Implementations§
Source§impl Clone for DescribeCommand
impl Clone for DescribeCommand
Source§fn clone(&self) -> DescribeCommand
fn clone(&self) -> DescribeCommand
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 DescribeCommand
impl Debug for DescribeCommand
Source§impl Default for DescribeCommand
impl Default for DescribeCommand
Source§fn default() -> DescribeCommand
fn default() -> DescribeCommand
Returns the “default value” for a type. Read more
Source§impl GitCommand for DescribeCommand
impl GitCommand for DescribeCommand
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<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn execute<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String>> + 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 DescribeCommand
impl RefUnwindSafe for DescribeCommand
impl Send for DescribeCommand
impl Sync for DescribeCommand
impl Unpin for DescribeCommand
impl UnsafeUnpin for DescribeCommand
impl UnwindSafe for DescribeCommand
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