Add rebase option for worktrees
This commit is contained in:
@@ -91,6 +91,8 @@ pub enum WorktreeAction {
|
||||
Fetch(WorktreeFetchArgs),
|
||||
#[clap(about = "Fetch refs from remotes and update local branches")]
|
||||
Pull(WorktreePullArgs),
|
||||
#[clap(about = "Rebase worktree onto default branch")]
|
||||
Rebase(WorktreeRebaseArgs),
|
||||
}
|
||||
|
||||
#[derive(Parser)]
|
||||
@@ -137,6 +139,14 @@ pub struct WorktreePullArgs {
|
||||
pub rebase: bool,
|
||||
}
|
||||
|
||||
#[derive(Parser)]
|
||||
pub struct WorktreeRebaseArgs {
|
||||
#[clap(long = "--pull", about = "Perform a pull before rebasing")]
|
||||
pub pull: bool,
|
||||
#[clap(long = "--rebase", about = "Perform a rebase when doing a pull")]
|
||||
pub rebase: bool,
|
||||
}
|
||||
|
||||
pub fn parse() -> Opts {
|
||||
Opts::parse()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user