Add fetch & pull option to worktrees
This commit is contained in:
@@ -87,6 +87,10 @@ pub enum WorktreeAction {
|
||||
Convert(WorktreeConvertArgs),
|
||||
#[clap(about = "Clean all worktrees that do not contain uncommited/unpushed changes")]
|
||||
Clean(WorktreeCleanArgs),
|
||||
#[clap(about = "Fetch refs from remotes")]
|
||||
Fetch(WorktreeFetchArgs),
|
||||
#[clap(about = "Fetch refs from remotes and update local branches")]
|
||||
Pull(WorktreePullArgs),
|
||||
}
|
||||
|
||||
#[derive(Parser)]
|
||||
@@ -121,6 +125,18 @@ pub struct WorktreeConvertArgs {}
|
||||
#[derive(Parser)]
|
||||
pub struct WorktreeCleanArgs {}
|
||||
|
||||
#[derive(Parser)]
|
||||
pub struct WorktreeFetchArgs {}
|
||||
|
||||
#[derive(Parser)]
|
||||
pub struct WorktreePullArgs {
|
||||
#[clap(
|
||||
long = "--rebase",
|
||||
about = "Perform a rebase instead of a fast-forward"
|
||||
)]
|
||||
pub rebase: bool,
|
||||
}
|
||||
|
||||
pub fn parse() -> Opts {
|
||||
Opts::parse()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user