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:3219–3231  ·  view source on GitHub ↗
(path: &Path)

Source from the content-addressed store, hash-verified

3217}
3218
3219fn path_to_git_string(path: &Path) -> CliResult<String> {
3220 let components: Result<Vec<_>, _> = path
3221 .components()
3222 .map(|component| {
3223 component
3224 .as_os_str()
3225 .to_str()
3226 .map(str::to_owned)
3227 .ok_or_else(|| git_error("working tree contains a non-UTF-8 path"))
3228 })
3229 .collect();
3230 Ok(components?.join("/"))
3231}
3232
3233fn tracked_delta(status: Status) -> bool {
3234 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