Skip to main content

MigrateCmd

Enum MigrateCmd 

Source
pub enum MigrateCmd {
    Import {
Show 15 fields args: Vec<String>, everything: bool, include: Vec<String>, exclude: Vec<String>, include_ref: Vec<String>, exclude_ref: Vec<String>, above: String, no_rewrite: bool, message: Option<String>, yes: bool, fixup: bool, skip_fetch: bool, object_map: Option<PathBuf>, verbose: bool, remote: Option<String>,
}, Export { branches: Vec<String>, everything: bool, include: Vec<String>, exclude: Vec<String>, include_ref: Vec<String>, exclude_ref: Vec<String>, skip_fetch: bool, object_map: Option<PathBuf>, verbose: bool, remote: Option<String>, yes: bool, }, Info {
Show 13 fields branches: Vec<String>, everything: bool, include: Vec<String>, exclude: Vec<String>, include_ref: Vec<String>, exclude_ref: Vec<String>, above: String, top: usize, pointers: Option<String>, unit: Option<String>, skip_fetch: bool, remote: Option<String>, fixup: bool,
}, }

Variants§

§

Import

Rewrite history so files matching the include filter become LFS pointers. With --no-rewrite, history is preserved and one new commit is appended on top of HEAD with the named paths converted in place.

Fields

§args: Vec<String>

Without --no-rewrite: branches/refs to rewrite (empty = current branch). With --no-rewrite: working-tree paths to convert.

§everything: bool

Walk every local branch and tag.

§include: Vec<String>

Convert paths matching this glob (repeatable). Required unless --above is set or --no-rewrite is given.

§exclude: Vec<String>

Exclude paths matching this glob (repeatable).

§include_ref: Vec<String>

Restrict the rewrite to commits reachable from these refs. Repeatable.

§exclude_ref: Vec<String>

Exclude commits reachable from these refs. Repeatable.

§above: String

Only convert files at least this large (e.g. 1mb, 500k).

§no_rewrite: bool

Don’t rewrite history. Read named paths from the working tree, convert in place, append one new commit on top of HEAD.

§message: Option<String>

Commit message for the --no-rewrite commit.

§yes: bool

Skip the prompt confirming history rewrite. Currently we never prompt, so this is accepted as a no-op for parity with upstream’s CLI surface.

§fixup: bool

Walk every commit and convert files that should be LFS pointers (per their commit’s .gitattributes) but currently aren’t. Mutually exclusive with --include, --exclude, --no-rewrite.

§skip_fetch: bool

Don’t fetch missing LFS objects from the remote before the rewrite — accepted as a no-op since we never auto-fetch today.

§object_map: Option<PathBuf>

Write a comma-separated <old>,<new> mapping of every rewritten commit OID to the named file.

§verbose: bool

Print a per-commit progress line as the rewrite walks history.

§remote: Option<String>

Remote to consult when fetching missing LFS objects (default origin).

§

Export

Inverse of import: rewrite history so LFS pointers become the raw bytes they reference. Requires the LFS objects to already be in the local store — git lfs fetch first if not. Pointers whose objects are missing are left as-is.

Fields

§branches: Vec<String>

Branches / refs to rewrite. Empty = current branch.

§everything: bool

Walk every local branch and tag.

§include: Vec<String>

Convert pointers at paths matching this glob (repeatable). Required.

§exclude: Vec<String>

Don’t convert pointers at paths matching this glob.

§include_ref: Vec<String>

Restrict the rewrite to commits reachable from these refs. Repeatable.

§exclude_ref: Vec<String>

Exclude commits reachable from these refs. Repeatable.

§skip_fetch: bool

Don’t fetch missing LFS objects from the remote before the rewrite — leave their pointers in place.

§object_map: Option<PathBuf>

Write a comma-separated <old>,<new> mapping of every rewritten commit OID to the named file. Useful as input to git filter-repo or other downstream tools.

§verbose: bool

Print a per-commit progress line as the rewrite walks history.

§remote: Option<String>

Remote to consult when fetching missing LFS objects (default origin).

§yes: bool

Skip the prompt confirming history rewrite. Currently we never prompt, so this is accepted as a no-op for parity with upstream’s CLI surface.

§

Info

Walk history and report file extensions by total size. Read-only — no objects or history change.

Fields

§branches: Vec<String>

Branches / refs to scan. Empty = current branch.

§everything: bool

Walk every local branch and tag.

§include: Vec<String>

Only include paths matching this glob (repeatable).

§exclude: Vec<String>

Exclude paths matching this glob (repeatable).

§include_ref: Vec<String>

Restrict the scan to commits reachable from these refs. Repeatable.

§exclude_ref: Vec<String>

Exclude commits reachable from these refs. Repeatable.

§above: String

Only count files at least this large (e.g. 1mb, 500k).

§top: usize

Maximum extension rows to show.

§pointers: Option<String>

How to handle existing LFS pointer blobs: follow (default), ignore, or no-follow. Defaults based on --fixup: ignore with the flag, follow without.

§unit: Option<String>

Force the size unit for byte counts (b, kb, mb, gb, tb, pb). Auto-scaled when omitted.

§skip_fetch: bool

Don’t fetch missing LFS objects from the remote — accepted as a no-op since we don’t auto-fetch today.

§remote: Option<String>

Remote to consult (no-op for now; reserved for the auto-fetch path).

§fixup: bool

Walk history looking for files that should be LFS but aren’t (per .gitattributes). Implies --pointers=ignore.

Trait Implementations§

Source§

impl FromArgMatches for MigrateCmd

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<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

impl Subcommand for MigrateCmd

Source§

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

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

fn augment_subcommands_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§

fn has_subcommand(__clap_name: &str) -> bool

Test whether Self can parse a specific subcommand

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.