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

Function path_to_git_string

atomic-cli/src/commands/git/shim.rs:3175–3187  ·  view source on GitHub ↗
(path: &Path)

Source from the content-addressed store, hash-verified

3173}
3174
3175fn path_to_git_string(path: &Path) -> CliResult<String> {
3176 let components: Result<Vec<_>, _> = path
3177 .components()
3178 .map(|component| {
3179 component
3180 .as_os_str()
3181 .to_str()
3182 .map(str::to_owned)
3183 .ok_or_else(|| git_error("working tree contains a non-UTF-8 path"))
3184 })
3185 .collect();
3186 Ok(components?.join("/"))
3187}
3188
3189fn tracked_delta(status: Status) -> bool {
3190 status.intersects(

Callers 1

collect_filesystemFunction · 0.85

Calls 3

componentsMethod · 0.80
git_errorFunction · 0.70
collectMethod · 0.45

Tested by

no test coverage detected