git-stk 0.7.0

Git-native stacked branch workflow helper
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use anyhow::Result;
use clap_complete::engine::ArgValueCompleter;

use crate::commands::Run;
use crate::completions;

/// Remove stack parent metadata from a branch.
#[derive(Debug, clap::Args)]
pub struct Detach {
    #[arg(add = ArgValueCompleter::new(completions::branch_candidates))]
    branch: Option<String>,
}

impl Run for Detach {
    fn run(self) -> Result<()> {
        crate::stack::detach_branch(self.branch.as_deref())
    }
}