2 ms·
The existing tools already let you choose the algorithm used to generate the diff, so it's not a big stretch to imagine an algorithm that may do just this. It d
by seba_dos1 3y ago
The existing tools already let you choose the algorithm used to generate the diff, so it's not a big stretch to imagine an algorithm that may do just this. It doesn't make much sense for such 1 line example (although it could if you had, say, an algorithm that considers whole paragraphs, or blocks in some programming language, rather than lines - could be useful for line art perhaps), but with more complex changes there won't be a single "optimal" representation, especially when what's "optimal" depends on what you want to optimize for.