pub fn delete_branch(repository: &Path, name: &str) -> Result<(), Error> {
    let status = process::Command::new("git")
        .args(&["branch", "-D", name])
        .current_dir(repository)
        .stdin(process::Stdio::null())
        .stdout(process::Stdio::null())
        .status()?;
    if !status.success() {
        return Err(Error::Git(format!("`git branch -D` returned {}", status)));
    }
    Ok(())
}
/// Delete a branch
///
/// This will fail if the branch doesn't exist.
Delete a branch
This will fail if the branch doesn't exist.
Delete a branch This will fail if the branch doesn ' t exist .
pub fn delete_branch(repository: &Path, name: &str) -> Result<(), Error> {
    let status = process::Command::new("git")
        .args(&["branch", "-D", name])
        .current_dir(repository)
        .stdin(process::Stdio::null())
        .stdout(process::Stdio::null())
        .status()?;
    if !status.success() {
        return Err(Error::Git(format!("`git branch -D` returned {}", status)));
    }
    Ok(())
}
pub fn delete_branch ( repository : & Path , name : & str ) -> Result < ( ) , Error > { let status = process :: Command :: new ( " " ) . args ( & [ " " , " " , name ] ) . current_dir ( repository ) . stdin ( process :: Stdio :: null ( ) ) . stdout ( process :: Stdio :: null ( ) ) . status ( ) ? ; if ! status . success ( ) { return Err ( Error :: Git ( format ! ( " " status ) ) ) ; } Ok ( ( ) ) }
Delete a branch
This will fail if the branch doesn't exist.
Delete a branch This will fail if the branch doesn ' t exist .
repository
&Path
name
&str
repository
&Path
name
&str