Parses `%H %ct` lines from `git log` into scanned commits, skipping malformed rows.
(stdout: &str)
| 156 | /// Parses `%H %ct` lines from `git log` into scanned commits, skipping |
| 157 | /// malformed rows. |
| 158 | fn parse_git_log_commits(stdout: &str) -> Vec<git_correlation::ScannedCommit> { |
| 159 | stdout |
| 160 | .lines() |
| 161 | .filter_map(|line| { |
| 162 | let (sha, ts) = line.trim().split_once(' ')?; |
| 163 | let committed_at: i64 = ts.trim().parse().ok()?; |
| 164 | let sha = sha.trim().to_ascii_lowercase(); |
| 165 | if sha.is_empty() { |
| 166 | return None; |
| 167 | } |
| 168 | Some(git_correlation::ScannedCommit { sha, committed_at }) |
| 169 | }) |
| 170 | .collect() |
| 171 | } |
| 172 | |
| 173 | fn push_file_source(sources: &mut Vec<Box<dyn TranscriptSource>>, provider: SessionProvider) { |
| 174 | match provider { |