MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / current_git_branch

Function current_git_branch

atomic-cli/src/commands/git/import.rs:156–162  ·  view source on GitHub ↗
(git_repo: &GitRepository)

Source from the content-addressed store, hash-verified

154}
155
156fn current_git_branch(git_repo: &GitRepository) -> Option<String> {
157 let head = git_repo.head().ok()?;
158 if !head.is_branch() {
159 return None;
160 }
161 head.shorthand().map(ToOwned::to_owned)
162}
163
164const GIT_SHADOW_EXCLUDE_PATTERNS: &[&str] = &["/.atomic/", "/.vault/", "/.atomicignore"];
165

Callers 2

get_default_branchMethod · 0.85
runMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected