Skip to content

Find diff_files using file_identifer_hash if available

This change allows us to use file_identifier_hash to find the correct diff file when there are more than one diff_file with the same file_path.

Currently, DiffNote creation can fail in some cases if a file has been changed from symlink to regular file with the same file_path or vice versa. We can comment on the first one because we always choose the first one currently, but commenting on the second diff_file would fail since the position with the correct line number cannot be found. This is because git returns two diff_files in the case of symlink typechange, one as removed and the other one as added.

Related to #33867

Edited by Sincheol (David) Kim

Merge request reports