Gets list of all branches.
(&self)
| 208 | |
| 209 | /// Gets list of all branches. |
| 210 | pub fn branches(&self) -> Result<Vec<String>> { |
| 211 | let output = self |
| 212 | .run_git_command(&["branch", "--format=%(refname:short)"]) |
| 213 | .context("Failed to list branches")?; |
| 214 | |
| 215 | Ok(output |
| 216 | .lines() |
| 217 | .map(|line| line.trim().to_string()) |
| 218 | .filter(|line| !line.is_empty()) |
| 219 | .collect()) |
| 220 | } |
| 221 | |
| 222 | /// Sets up a repository with uncommitted changes. |
| 223 | /// Creates both staged and unstaged files. |
no test coverage detected