pub struct TrackArgs {
pub patterns: Vec<String>,
pub verbose: bool,
pub dry_run: bool,
pub json: bool,
pub filename: bool,
pub lockable: bool,
pub not_lockable: bool,
pub no_excluded: bool,
pub no_modify_attrs: bool,
}Expand description
View or add Git LFS paths to Git attributes
Start tracking the given pattern(s) through Git LFS. The argument is
written to .gitattributes. If no paths are provided, list the
currently-tracked paths.
Per gitattributes(5), patterns use the gitignore(5) pattern rules to
match paths. This means that patterns containing asterisk (*),
question mark (?), and the bracket characters ([ and ]) are
treated specially; to disable this behavior and treat them literally
instead, use --filename or escape the character with a backslash.
Fields§
§patterns: Vec<String>File patterns to track (e.g. *.jpg, data/*.bin).
verbose: boolLog files which git lfs track will touch. Disabled by default.
dry_run: boolLog all actions that would normally take place (adding entries
to .gitattributes, touching files on disk, etc.) without
performing any mutative operations.
Implicitly mocks the behavior of --verbose, logging in greater
detail what it is doing. Disabled by default.
json: boolWrite the currently tracked patterns as JSON to standard output.
Intended for interoperation with external tools. Cannot be
combined with any pattern arguments. If --no-excluded is also
provided, that option will have no effect.
filename: boolTreat the arguments as literal filenames, not as patterns.
Any special glob characters in the filename will be escaped
when writing the .gitattributes file.
lockable: boolMake the paths “lockable” — they should be locked to edit them, and will be made read-only in the working copy when not locked.
not_lockable: boolRemove the lockable flag from the paths so they are no longer read-only unless locked.
no_excluded: boolDon’t list patterns that are excluded in the output; only list patterns that are tracked.
no_modify_attrs: boolMake matched entries stat-dirty so that Git can re-index files you wish to convert to LFS.
Does not modify any .gitattributes file.
Trait Implementations§
Source§impl Args for TrackArgs
impl Args for TrackArgs
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
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§impl FromArgMatches for TrackArgs
impl FromArgMatches for TrackArgs
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>
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>
ArgMatches to self.