(
repo: &atomic_repository::Repository,
view: &str,
git_sha: &str,
)
| 152 | } |
| 153 | |
| 154 | fn change_of( |
| 155 | repo: &atomic_repository::Repository, |
| 156 | view: &str, |
| 157 | git_sha: &str, |
| 158 | ) -> atomic_core::change::Change { |
| 159 | let entries = repo.effective_history(Some(view)).unwrap(); |
| 160 | for entry in entries { |
| 161 | let change = repo.load_change(&entry.hash).unwrap(); |
| 162 | let sha = change |
| 163 | .unhashed |
| 164 | .as_ref() |
| 165 | .and_then(|value| value.get("git")) |
| 166 | .and_then(|git| git.get("sha")) |
| 167 | .and_then(|sha| sha.as_str()); |
| 168 | if sha == Some(git_sha) { |
| 169 | return change; |
| 170 | } |
| 171 | } |
| 172 | panic!("no imported change for git commit {git_sha}") |
| 173 | } |
| 174 | |
| 175 | fn projected( |
| 176 | repo: &atomic_repository::Repository, |
no test coverage detected