Current SWHID specification enables to point to a specific fragment inside a source code file, for instance [[ https://archive.softwareheritage.org/swh:1:cnt:4d99d2d18326621ccdd70f5ea66c2e2ac236ad8b;origin=https://gitorious.org/ocamlp3l/ocamlp3l_cvs.git;visit=swh:1:snp:d7f1b9eb7ccb596c2622c4780febaa02549830f9;anchor=swh:1:rev:2db189928c94d62a3b4757b3eec68f0a4d4113f0;path=/Examples/SimpleFarm/simplefarm.ml;lines=9-15 | swh:1:cnt:4d99d2d18326621ccdd70f5ea66c2e2ac236ad8b;origin=https://gitorious.org/ocamlp3l/ocamlp3l_cvs.git;visit=swh:1:snp:d7f1b9eb7ccb596c2622c4780febaa02549830f9;anchor=swh:1:rev:2db189928c94d62a3b4757b3eec68f0a4d4113f0;path=/Examples/SimpleFarm/simplefarm.ml;lines=9-15 ]].
In a similar manner, it would be of interest to point through SWHIDs to specific fragments of a source code diff that can be derived from a SWH revision (see example [[ https://archive.softwareheritage.org/browse/revision/26857cef4ea09c7a96311c898ac6859b66f29d39/?origin_url=https://github.com/Helium4Haskell/lvm×tamp=2020-09-11T09:06:05Z#diff_8cc4c4efd968bc1eed3bd43165d9a5a2b20d5910+F131T132-F132T137-unified | here ]]).
That task is here to investigate if such a specification could be added to revision SWHIDs and if it can be resolved afterwards by the SWH Web application.
After a first discussion on the subject with @rdiscosmo, this could be achieved by using the `path` and `lines` qualifiers on a revision SWHID.
Nervertheless, diffs may be complex and there is plenty of edge cases to handle. So let's see if we can cover all of them using the above qualifiers.