Skip to main content

InstallArgs

Struct InstallArgs 

Source
pub struct InstallArgs {
    pub force: bool,
    pub local: bool,
    pub worktree: bool,
    pub system: bool,
    pub file: Option<PathBuf>,
    pub skip_smudge: bool,
    pub skip_repo: bool,
}
Expand description

Install Git LFS configuration

Set up the lfs smudge and clean filters under the name lfs in the global Git config, and (when run from inside a repository) install a pre-push hook to run git-lfs-pre-push(1). If core.hooksPath is configured in any Git configuration (supported on Git v2.9.0 or later), the pre-push hook is installed to that directory instead.

Without any options, only sets up the lfs smudge and clean filters if they are not already set.

Fields§

§force: bool

Set the lfs smudge and clean filters, overwriting existing values.

§local: bool

Set the lfs smudge and clean filters in the local repository’s git config, instead of the global git config (~/.gitconfig).

§worktree: bool

Set the lfs smudge and clean filters in the current working tree’s git config, instead of the global git config (~/.gitconfig) or local repository’s git config ($GIT_DIR/config).

If multiple working trees are in use, the Git config extension worktreeConfig must be enabled to use this option. If only one working tree is in use, --worktree has the same effect as --local. Available only on Git v2.20.0 or later.

§system: bool

Set the lfs smudge and clean filters in the system git config, e.g. /etc/gitconfig instead of the global git config (~/.gitconfig).

§file: Option<PathBuf>

Set the lfs smudge and clean filters in the Git configuration file specified by <PATH>.

§skip_smudge: bool

Skip automatic downloading of objects on clone or pull.

Requires a manual git lfs pull every time a new commit is checked out on the repository.

§skip_repo: bool

Skip installation of hooks into the local repository.

Use if you want to install the LFS filters but not make changes to the hooks. Valid alongside --local, --worktree, --system, or --file.

Trait Implementations§

Source§

impl Args for InstallArgs

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 InstallArgs

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.