Requests for comment/Anchor links for lines changed in diffs
|Anchor links for lines changed in diffs|
|Document status||early draft|
|Implementation status||not started|
It may be useful to provide anchor links for lines in diffs, but if the diff algorithm changes significantly these links will be broken.
Proposal[edit | edit source]
- The plus and minus signs in a diff (example diff) should be changed to links, or have links added right next to them, which add #line[linenumber] to the URL.
- The current diff algorithm should be given a code, like "diff1" or "diff3".
(draft... please expand)
Comments[edit | edit source]
- My thanks to PiRSquared17 for opening this - I filed the original bug. It's a good point about line diff anchors potentially breaking if the diff algorithm changes. I'll copy what I suggested for that over there:
- [Links breaking can be avoided if] the anchor URL specifies what kind of diff is in use, and that particular diff algorithms are always kept available.
- In that case, [an] example URL... would look something like the following (pretending that our current diff algo is called "
- A diff without
difftype=would always use the latest algorithm, whatever it may be. [I.e., this is current behavior.] Obviously this raises the complexity somewhat; I don't know what the internal policy with regards to diff algorithms is. I would like to imagine that access could still be provided to older ones in the event of changes. Someone who's actually a developer, unlike me, can hopefully shed some light on that.
- — Scott • talk 14:00, 8 March 2014 (UTC)