Expand description
Git history mining — Layer 0 signal extraction via git2.
Single-pass revwalk over full history (capped at MAX_COMMITS non-merge
commits) to extract per-file change frequency, last author, hotspot
detection, rename tracking, and co-change pairs.
§Performance
- Commit cap keeps large repos predictable: O(5k) not O(all history).
- Merge commits skipped (no signal) and don’t count toward the cap.
- Bulk commits (>50 files) skipped for co-change pairs (O(n²) avoidance).
context_lines(0)+ no hunk/line callbacks: git2 skips content diffing.walked_filesHashSet: O(1) per-delta membership check.
§Graceful degradation (P9)
All errors return Ok(GitSignals::empty()) — never fatal.
No .git directory, unborn HEAD, shallow clones — all handled silently.
Structs§
- GitSignals
- Git-derived signals for an entire repository, keyed by repo-relative path.
Functions§
- mine_
git_ history - Single-pass revwalk over full history (capped at MAX_COMMITS non-merge commits).