Annotating diffs
summary
Proposes an annotated diff format that prefixes each changed line with the commit hash and original line number, and tracks renames so removed lines show who deleted them; uses git annotate, reverse walks and DAG walking to generate those annotations; implements an incremental single-file algorithm that aims for one DAG walk and no cache but finds it produces nonstandard diffs and needs repeated diff passes; settles on a pragmatic fast approach: generate the exact diff first, then cache line ranges and walk the DAG twice for correctness and performance.
AI-written summary · about
