pub struct DiffArgs {
pub from: Option<String>,
pub to: Option<String>,
pub base: Option<DiffBaseArg>,
pub path_filters: Vec<String>,
pub paths: Vec<String>,
pub semantic: bool,
pub stat: bool,
pub name_only: bool,
pub unified: usize,
pub context: bool,
pub patch: bool,
}Expand description
Arguments for the diff command.
Fields§
§from: Option<String>Base state (default: HEAD). A path-shaped value is a worktree filter.
to: Option<String>Target state (default: worktree). A path-shaped value is a worktree filter.
base: Option<DiffBaseArg>Select an additional diff base. last-turn uses the first capture in
the live harness session on this thread. With this set, one state
positional names the target rather than another base.
path_filters: Vec<String>Restrict the diff to these repository-relative paths.
paths: Vec<String>Paths after --. Always treated as worktree/path filters.
semantic: boolShow semantic changes.
stat: boolShow diffstat summary only.
name_only: boolShow only changed file names.
unified: usizeNumber of surrounding context lines to include in each hunk.
context: boolShow concise applicable context alongside diff output.
patch: boolOutput a Git-compatible unified diff.
Trait Implementations§
Source§impl Args for DiffArgs
impl Args for DiffArgs
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
Append to
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§impl FromArgMatches for DiffArgs
impl FromArgMatches for DiffArgs
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>
Assign values from
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>
Assign values from
ArgMatches to self.Auto Trait Implementations§
impl Freeze for DiffArgs
impl RefUnwindSafe for DiffArgs
impl Send for DiffArgs
impl Sync for DiffArgs
impl Unpin for DiffArgs
impl UnsafeUnpin for DiffArgs
impl UnwindSafe for DiffArgs
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