Resolve a rename that collides with another delta of the same commit. Rename detection pairs a vacated blob with an added path even when the commit re-occupies the vacated path (emanote `dc1fb69`: `README.md` moved into `emanote/` while a symlink to the moved file takes the old path) or deletes the entry that held the target path (the mirror: a symlink replaced by the regular file it pointed to).
(files: Vec<ParsedFile>)
| 9325 | /// Modified delta of the target carrying the deleted entry's bytes as its |
| 9326 | /// baseline. Ordinary renames, swaps and rotations are returned untouched. |
| 9327 | fn normalize_rename_collisions(files: Vec<ParsedFile>) -> Vec<ParsedFile> { |
| 9328 | let collisions = RenameCollisions::collect(&files); |
| 9329 | if collisions.is_empty() { |
| 9330 | return files; |
| 9331 | } |
| 9332 | files |
| 9333 | .into_iter() |
| 9334 | .map(|file| collisions.rewrite(file)) |
| 9335 | .collect() |
| 9336 | } |
| 9337 | |
| 9338 | fn parse_diff_files_via_git_cli( |
| 9339 | git_repo: &GitRepository, |