Skip to main content

TrackArgs

Struct TrackArgs 

Source
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: bool

Log files which git lfs track will touch. Disabled by default.

§dry_run: bool

Log 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: bool

Write 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: bool

Treat the arguments as literal filenames, not as patterns.

Any special glob characters in the filename will be escaped when writing the .gitattributes file.

§lockable: bool

Make 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: bool

Remove the lockable flag from the paths so they are no longer read-only unless locked.

§no_excluded: bool

Don’t list patterns that are excluded in the output; only list patterns that are tracked.

§no_modify_attrs: bool

Make 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

Source§

fn group_id() -> Option<Id>

Report the ArgGroup::id for this set of arguments
Source§

fn augment_args<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate Self via FromArgMatches::from_arg_matches_mut Read more
Source§

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 more
Source§

impl FromArgMatches for TrackArgs

Source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

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>

Assign values from ArgMatches to self.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.