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

Function git_head_paths

atomic-cli/src/commands/git/shim.rs:1554–1561  ·  view source on GitHub ↗
(git: &GitRepository)

Source from the content-addressed store, hash-verified

1552}
1553
1554fn git_head_paths(git: &GitRepository) -> CliResult<BTreeSet<String>> {
1555 let tree = git
1556 .head()
1557 .and_then(|head| head.peel_to_commit())
1558 .and_then(|commit| commit.tree())
1559 .map_err(|error| git_error(format!("cannot read current Git HEAD tree: {error}")))?;
1560 Ok(read_git_tree(git, &tree)?.into_keys().collect())
1561}
1562
1563fn git_branch_paths(git: &GitRepository, branch: &str) -> CliResult<BTreeSet<String>> {
1564 let reference_name = format!("refs/heads/{branch}");

Callers 1

switch_transactionFunction · 0.85

Calls 5

read_git_treeFunction · 0.85
treeMethod · 0.80
git_errorFunction · 0.70
headMethod · 0.45
collectMethod · 0.45

Tested by

no test coverage detected