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

Function current_git_branch

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

Source from the content-addressed store, hash-verified

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

Callers 2

get_default_branchMethod · 0.85
runMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected