pub struct NotesCommand {
pub executor: CommandExecutor,
pub ref_namespace: Option<String>,
pub action: NotesAction,
}Expand description
Builder for git notes.
Fields§
§executor: CommandExecutorShared executor.
ref_namespace: Option<String>--ref <namespace> — the notes ref to operate on (raw, not prefixed).
action: NotesActionAction.
Implementations§
Source§impl NotesCommand
impl NotesCommand
Sourcepub fn ref_namespace(&mut self, ns: impl Into<String>) -> &mut Self
pub fn ref_namespace(&mut self, ns: impl Into<String>) -> &mut Self
Operate on the given notes ref namespace, emitted as --ref <ns>.
The value is forwarded verbatim — git-spawn does not prepend
refs/notes/. Pass a full ref (refs/notes/embeddings) or a short name
(build); git resolves short names under refs/notes/ itself.
Sourcepub fn object(&mut self, o: impl Into<String>) -> &mut Self
pub fn object(&mut self, o: impl Into<String>) -> &mut Self
Set the target object (for add, append, show, list, remove).
Sourcepub fn message(&mut self, m: impl Into<String>) -> &mut Self
pub fn message(&mut self, m: impl Into<String>) -> &mut Self
Note payload as an inline string, emitted as -m <msg> (for add /
append).
For binary or large payloads prefer message_file
to avoid argument-length limits.
Sourcepub fn message_file(&mut self, p: impl Into<PathBuf>) -> &mut Self
pub fn message_file(&mut self, p: impl Into<PathBuf>) -> &mut Self
Note payload read from a file, emitted as -F <path> (for add /
append). The preferred form for binary or multi-kilobyte payloads.
Sourcepub fn allow_empty(&mut self) -> &mut Self
pub fn allow_empty(&mut self) -> &mut Self
--allow-empty — store a note even when the payload is empty (for add
/ append).
Sourcepub fn no_stripspace(&mut self) -> &mut Self
pub fn no_stripspace(&mut self) -> &mut Self
--no-stripspace — preserve the payload byte-for-byte instead of
trimming whitespace (for add / append). Required for exact binary
round-trips.
Sourcepub fn ignore_missing(&mut self) -> &mut Self
pub fn ignore_missing(&mut self) -> &mut Self
--ignore-missing — exit zero when there is no note to remove (for
remove).
Trait Implementations§
Source§impl Clone for NotesCommand
impl Clone for NotesCommand
Source§fn clone(&self) -> NotesCommand
fn clone(&self) -> NotesCommand
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for NotesCommand
impl Debug for NotesCommand
Source§impl GitCommand for NotesCommand
impl GitCommand for NotesCommand
Source§type Output = CommandOutput
type Output = CommandOutput
Source§fn get_executor(&self) -> &CommandExecutor
fn get_executor(&self) -> &CommandExecutor
Source§fn get_executor_mut(&mut self) -> &mut CommandExecutor
fn get_executor_mut(&mut self) -> &mut CommandExecutor
Source§fn build_command_args(&self) -> Vec<String>
fn build_command_args(&self) -> Vec<String>
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,
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,
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
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
Source§fn with_timeout(&mut self, timeout: Duration) -> &mut Self
fn with_timeout(&mut self, timeout: Duration) -> &mut Self
Error::Timeout is returned.