Struct Args

Source
pub struct Args {
    pub bases: Vec<String>,
    pub protected: Vec<String>,
    pub no_update: bool,
    pub update: bool,
    pub update_interval: Option<u64>,
    pub no_confirm: bool,
    pub confirm: bool,
    pub no_detach: bool,
    pub detach: bool,
    pub delete: Vec<DeleteRange>,
    pub dry_run: bool,
}

Fields§

§bases: Vec<String>

Comma separated multiple names of branches. All the other branches are compared with the upstream branches of those branches. [default: branches that tracks git symbolic-ref refs/remotes/*/HEAD] [config: trim.bases]

The default value is a branch that tracks git symbolic-ref refs/remotes/*/HEAD. They might not be reflected correctly when the HEAD branch of your remote repository is changed. You can see the changed HEAD branch name with git remote show <remote> and apply it to your local repository with git remote set-head <remote> --auto.

§protected: Vec<String>

Comma separated multiple glob patterns (e.g. release-*, feature/*) of branches that should never be deleted. [config: trim.protected]

§no_update: bool

Do not update remotes [config: trim.update]

§update: bool§update_interval: Option<u64>

Prevents too frequent updates. Seconds between updates in seconds. 0 to disable. [default: 5] [config: trim.updateInterval]

§no_confirm: bool

Do not ask confirm [config: trim.confirm]

§confirm: bool§no_detach: bool

Do not detach when HEAD is about to be deleted [config: trim.detach]

§detach: bool§delete: Vec<DeleteRange>

Comma separated values of <delete range>[:<remote name>]. Delete range is one of the merged, merged-local, merged-remote, stray, diverged, local, remote. :<remote name> is only necessary to a <delete range> when the range is applied to remote branches. You can use * as <remote name> to delete a range of branches from all remotes. [default : merged:origin] [config: trim.delete]

merged implies merged-local,merged-remote.

merged-local will delete merged tracking local branches. merged-remote:<remote> will delete merged upstream branches from <remote>. stray will delete tracking local branches, which is not merged, but the upstream is gone. diverged:<remote> will delete merged tracking local branches, and their upstreams from <remote> even if the upstreams are not merged and diverged from local ones. local will delete non-tracking merged local branches. remote:<remote> will delete non-upstream merged remote tracking branches. Use with caution when you are using other than merged. It might lose changes, and even nuke repositories.

§dry_run: bool

Do not delete branches, show what branches will be deleted.

Implementations§

Source§

impl Args

Source

pub fn update(&self) -> Option<bool>

Source

pub fn confirm(&self) -> Option<bool>

Source

pub fn detach(&self) -> Option<bool>

Trait Implementations§

Source§

impl Args for Args

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 CommandFactory for Args

Source§

fn command<'b>() -> Command

Build a Command that can instantiate Self. Read more
Source§

fn command_for_update<'b>() -> Command

Build a Command that can update self. Read more
Source§

impl Default for Args

Source§

fn default() -> Args

Returns the “default value” for a type. Read more
Source§

impl FromArgMatches for Args

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

impl Parser for Args

Source§

fn parse() -> Self

Parse from std::env::args_os(), exit on error.
Source§

fn try_parse() -> Result<Self, Error>

Parse from std::env::args_os(), return Err on error.
Source§

fn parse_from<I, T>(itr: I) -> Self
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Parse from iterator, exit on error.
Source§

fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Parse from iterator, return Err on error.
Source§

fn update_from<I, T>(&mut self, itr: I)
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Update from iterator, exit on error. Read more
Source§

fn try_update_from<I, T>(&mut self, itr: I) -> Result<(), Error>
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Update from iterator, return Err on error.

Auto Trait Implementations§

§

impl Freeze for Args

§

impl RefUnwindSafe for Args

§

impl Send for Args

§

impl Sync for Args

§

impl Unpin for Args

§

impl UnwindSafe for Args

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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
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.
Source§

impl<T> ErasedDestructor for T
where T: 'static,