Skip to main content

PruneArgs

Struct PruneArgs 

Source
pub struct PruneArgs {
    pub dry_run: bool,
    pub verbose: bool,
    pub recent: bool,
    pub force: bool,
    pub verify_remote: bool,
    pub no_verify_remote: bool,
    pub verify_unreachable: bool,
    pub no_verify_unreachable: bool,
    pub when_unverified: String,
}
Expand description

Delete old LFS files from local storage

Delete locally stored LFS objects that aren’t reachable from HEAD or any unpushed commit, freeing up disk space.

Fields§

§dry_run: bool

Don’t actually delete anything; just report what would have been done.

§verbose: bool

Report the full detail of what is/would be deleted.

§recent: bool

Ignore the recent-refs / recent-commits retention windows when computing what is prunable. Equivalent to setting lfs.fetchrecentrefsdays and lfs.fetchrecentcommitsdays to 0 for this invocation.

§force: bool

Treat every pushed object as prunable regardless of the recent-refs / recent-commits / unpushed retention rules. Pointers reachable from HEAD’s tree are still kept.

§verify_remote: bool

Verify with the remote that prunable objects exist there before deleting them locally. With this on, an object that can’t be served by the remote either halts the prune (default) or is dropped from the delete set (--when-unverified=continue). Reachable-but-unverified objects are reported as missing on remote:; unreachable objects (orphans not in any commit) are silently passed through unless --verify-unreachable is also set. Overrides lfs.pruneverifyremotealways.

§no_verify_remote: bool

Override lfs.pruneverifyremotealways=true and skip the remote verify pass for this invocation.

§verify_unreachable: bool

When --verify-remote is in effect, verify orphan objects (not reachable from any commit) too. Without this, orphans pass through verification silently and are still pruned. Overrides lfs.pruneverifyunreachablealways.

§no_verify_unreachable: bool

Override lfs.pruneverifyunreachablealways=true and skip orphan verification for this invocation.

§when_unverified: String

What to do when --verify-remote finds objects missing on the remote. halt (the default) refuses the prune and lists the missing OIDs; continue drops them from the delete set and prunes the verified ones.

Trait Implementations§

Source§

impl Args for PruneArgs

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 PruneArgs

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.