MCPcopy Create free account
hub / github.com/dtormoen/tsk-tsk / branches

Method branches

src/test_utils/git_test_utils.rs:210–220  ·  view source on GitHub ↗

Gets list of all branches.

(&self)

Source from the content-addressed store, hash-verified

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.

Calls 1

run_git_commandMethod · 0.80

Tested by

no test coverage detected