Add fetch & pull option to worktrees

This commit is contained in:
2021-12-29 11:19:00 +01:00
parent ef381c7421
commit 717b0d3a74
6 changed files with 385 additions and 22 deletions

View File

@@ -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()
}