(repo: &Repository, branch_name: &str)
| 178 | |
| 179 | #[allow(dead_code)] |
| 180 | pub fn delete_local_branch(repo: &Repository, branch_name: &str) { |
| 181 | let mut some_branch = repo.find_branch(branch_name, BranchType::Local).unwrap(); |
| 182 | |
| 183 | // Should not be able to delete branch_name if it is the current working tree |
| 184 | assert!(!some_branch.is_head()); |
| 185 | |
| 186 | some_branch.delete().unwrap(); |
| 187 | } |
| 188 | |
| 189 | #[allow(dead_code)] |
| 190 | pub fn get_current_branch_name(repo: &Repository) -> String { |