It has been pointed out by Moritz Schubotz in an EOSC task force discussion that it is useful to be able to point to fragments of code in a diff, not just in a file.
Here is an example of what can be done in GitHub today:
It would be nice to provide a similar functionality in Software Heritage.