Skip to main content

FetchArgs

Struct FetchArgs 

Source
pub struct FetchArgs {
    pub args: Vec<String>,
    pub include: Vec<String>,
    pub exclude: Vec<String>,
    pub all: bool,
    pub stdin: bool,
    pub prune: bool,
    pub refetch: bool,
    pub dry_run: bool,
    pub recent: bool,
    pub json: bool,
}
Expand description

Download all Git LFS files for a given ref

Download Git LFS objects at the given refs from the specified remote. See DEFAULT REMOTE and DEFAULT REFS for what happens if you don’t specify.

This does not update the working copy; use git-lfs-pull(1) to download and replace pointer text with object content, or git-lfs-checkout(1) to materialize already-downloaded objects.

Fields§

§args: Vec<String>

Optional remote name followed by refs. The first positional argument is treated as a remote name when it resolves; any following arguments are refs to fetch.

§include: Vec<String>

Specify lfs.fetchinclude just for this invocation; see INCLUDE AND EXCLUDE.

§exclude: Vec<String>

Specify lfs.fetchexclude just for this invocation; see INCLUDE AND EXCLUDE.

§all: bool

Download all objects that are referenced by any commit reachable from the refs provided as arguments.

If no refs are provided, then all refs are fetched. This is primarily for backup and migration purposes. Cannot be combined with --include/--exclude. Ignores any globally configured include and exclude paths to ensure that all objects are downloaded.

§stdin: bool

Read a list of newline-delimited refs from standard input instead of the command line.

§prune: bool

Prune old and unreferenced objects after fetching, equivalent to running git lfs prune afterwards. See git-lfs-prune(1) for more details.

§refetch: bool

Also fetch objects that are already present locally.

Useful for recovery from a corrupt local store.

§dry_run: bool

Print what would be fetched, without actually fetching anything.

§recent: bool

Also fetch recently-touched refs and the recent pre-images on each.

Walk every ref under refs/heads/ (and, by default, every remote-tracking ref) whose tip commit lies within lfs.fetchrecentrefsdays of today, and on each of those refs download the pre-image of every LFS file modified within lfs.fetchrecentcommitsdays. Combine with the named refs’ HEAD-state fetch. The same behaviour fires automatically if lfs.fetchrecentalways is set.

§json: bool

Write the details of all object transfer requests as JSON to standard output.

Intended for interoperation with external tools. When --dry-run is also specified, writes the details of the transfers that would occur if the objects were fetched.

Trait Implementations§

Source§

impl Args for FetchArgs

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 FetchArgs

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.