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

Method current_branch

src/test_utils/git_test_utils.rs:181–187  ·  view source on GitHub ↗

Gets the name of the current branch.

(&self)

Source from the content-addressed store, hash-verified

179
180 /// Gets the name of the current branch.
181 pub fn current_branch(&self) -> Result<String> {
182 let output = self
183 .run_git_command(&["branch", "--show-current"])
184 .context("Failed to get current branch")?;
185
186 Ok(output.trim().to_string())
187 }
188
189 /// Creates and checks out a new branch.
190 pub fn checkout_new_branch(&self, branch_name: &str) -> Result<()> {

Callers 5

setup_with_branchesMethod · 0.80
clone_fromMethod · 0.80
test_branch_operationsFunction · 0.80

Calls 1

run_git_commandMethod · 0.80

Tested by

no test coverage detected