in case anyone missed it: https://github.com/Wilfred/difftastic
in case anyone missed it: https://github.com/Wilfred/difftastic
To me this looks like integrating it with tools of actual conflict resolution during merges will be a bit harder than one would like. I'd be glad to be wrong.
I think it's reasonable to argue that git shouldn't get confused in this scenario, but you could also do your renames in one commit and your changes in another.
I think git can be configured on how hard it tries to find renames from similarity between a deleted file and an added file.
You can find more information on how Git now does it at https://blog.palantir.com/optimizing-gits-merge-machinery-1-... . I think this first started to be released in v2.31.0, and completed in v2.33.0. v2.34.0 switched the default merge strategy to the new 'ort' strategy mentioned in that blog.
I think there are unfortunately still cases where what the GP is suggesting improves the UX, i.e. I think some shortcuts are taken when following a file if the content doesn't change.
IIRC this matters particularly for very large renames, at some point during revision walking we'll give up trying to match your A.txt to B.txt, but if they're the same...
It's your POV that it's the same file. One could argue that it's a new file and the content of the old one embed in the file. That's the huge problem with git users, people cling desperately to the idea of changes, when git is just about snapshots.
It also happens that one is much, much more common in software development than the other, so it's a much better mental model of what SEs do.
So you're clinging to your mental model. Thanks for proving my point.
I could contort my mental model to make it match how Git works, but it is a contortion that some tool imposes on me.
We work in computing, I would expect everyone's mental models to be computational, not equational - different algorithms with the same result are still different. QuickSort is not the same as Merge sort just because they have the same inputs and outputs.
You may be aluding to git's underlying storage being snapshot based, but it actually also has diffs in pack files.
Storage optimization, absolutely unrelated to the diff between two snapshots.