MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / parse_git_log_commits

Function parse_git_log_commits

src/sessions/mod.rs:158–171  ·  view source on GitHub ↗

Parses `%H %ct` lines from `git log` into scanned commits, skipping malformed rows.

(stdout: &str)

Source from the content-addressed store, hash-verified

156/// Parses `%H %ct` lines from `git log` into scanned commits, skipping
157/// malformed rows.
158fn 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
173fn push_file_source(sources: &mut Vec<Box<dyn TranscriptSource>>, provider: SessionProvider) {
174 match provider {

Calls 3

collectMethod · 0.80
parseMethod · 0.45
is_emptyMethod · 0.45