async fn whole_files_for(
cwd: &Path,
ceiling: u64,
threads: &[ReviewThread],
content: &DiffContent,
default_branch: Option<&str>,
base_rev: Option<&str>,
) -> HashMap<(String, ReviewSide), WholeFile>Expand description
The whole files for the anchors no hunk carries a line for.
A comment written on a revealed context line is outside the diff’s hunks by construction, and the file it was written on is the whole answer. The new side is numbered at the branch tip and the old side at the merge-base, because the branch-ahead diff is a three-dot diff; an old side read at the base’s current tip would shift every line when the base has advanced. A renamed file’s old side is read at its old path. Only a thread this record’s own diff can draw is read for: another base’s thread, or a commit-scoped one whose line counts in its own commit, keeps the resolver’s answer. A read that fails leaves the anchor to the bounded content, as before.