Prefix a trace-relative path with the subpath portion, if any. Used when looking up paths via libgit2 (commits_under, show_at) — git always wants repo-relative paths even though the caller speaks trace-relative.
(repo: &Repository, root: &Path, rel: &str)
| 90 | /// looking up paths via libgit2 (commits_under, show_at) — git always wants |
| 91 | /// repo-relative paths even though the caller speaks trace-relative. |
| 92 | fn translate(repo: &Repository, root: &Path, rel: &str) -> String { |
| 93 | match repo_subpath(repo, root) { |
| 94 | Some(sub) => sub.join(rel).to_string_lossy().replace('\\', "/"), |
| 95 | None => rel.to_string(), |
| 96 | } |
| 97 | } |
| 98 | |
| 99 | fn signature() -> Result<Signature<'static>> { |
| 100 | Signature::now(AUTHOR_NAME, AUTHOR_EMAIL).context("building git signature") |
no test coverage detected
searching dependent graphs…