(output: &str)
| 277 | } |
| 278 | |
| 279 | fn parse_remote_commits(output: &str) -> Vec<GitCommit> { |
| 280 | output |
| 281 | .lines() |
| 282 | .filter_map(|line| { |
| 283 | let mut fields = line.splitn(6, '\t'); |
| 284 | let hash = fields.next()?.to_string(); |
| 285 | let short_hash = fields.next()?.to_string(); |
| 286 | let author = fields.next()?.to_string(); |
| 287 | let author_email = fields.next()?.to_string(); |
| 288 | let date = fields.next()?.to_string(); |
| 289 | let message = fields.next().unwrap_or_default().to_string(); |
| 290 | Some(GitCommit { |
| 291 | hash, |
| 292 | short_hash, |
| 293 | message, |
| 294 | author, |
| 295 | author_email, |
| 296 | date, |
| 297 | parents: Vec::new(), |
| 298 | additions: None, |
| 299 | deletions: None, |
| 300 | files_changed: None, |
| 301 | }) |
| 302 | }) |
| 303 | .collect() |
| 304 | } |
| 305 | |
| 306 | fn parse_remote_name_status_output(output: &str) -> Vec<GitChangedFile> { |
| 307 | output |
no test coverage detected