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§
Trait Implementations§
Source§impl Args for Args
impl Args for Args
Source§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command
so it can instantiate self
via
FromArgMatches::update_from_arg_matches_mut
Read moreSource§impl CommandFactory for Args
impl CommandFactory for Args
Source§impl FromArgMatches for Args
impl FromArgMatches for Args
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches
to self
.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches
to self
.Source§impl Parser for Args
impl Parser for Args
Source§fn parse_from<I, T>(itr: I) -> Self
fn parse_from<I, T>(itr: I) -> Self
Source§fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
Source§fn update_from<I, T>(&mut self, itr: I)
fn update_from<I, T>(&mut self, itr: I)
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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