Skip to main content

attribute_commit

Function attribute_commit 

Source
pub fn attribute_commit(
    author_time: i64,
    repo_path: &str,
    candidates: &[TouchingSession],
) -> Attribution
Expand description

Map a commit’s author-time to the session most likely behind it, among the sessions that touched the file. (a) sessions whose [started,ended] window contains author_time; (b) else the most recent session that ended at/before author_time within LAG_WINDOW_SECS; project-ancestor breaks ties. >=2 keep as ambiguous; none -> unattributed.