I think the real failing is that it isn't very good at handling the "rename and slightly modify" case, even when it theoretically could. Of course it's non-trivial to detect that case, and there are flags you can use to improve the detection but it's still not great in my experience.
It might make sense to allow adding hints to the git commit message to help it. Dunno if anyone has tried implementing that.
(Personally, I've not come across the need for such a feature. But I can understand why people might want to have it be available.)
* You need to add `git cp`.
* You'll mess things up if you accidentally `mv` instead of `git mv`.
* All IDEs have to add support for this.
* Have fun resolving metadata merge conflicts!
That's just the things I thought if in a few seconds.
IMO the sensible way to improve this is to have a place for Git to add hints, so that it's automatic rename detection algorithms work better.
Files just need to know where they moved from, if anywhere. Copy, modify, delete operations can be auto-detected almost all of the time. Lineage can be edited after the fact if needed.
$ git blame file3 -C1
9afddd5e file3 (Izkata 2024-01-01 11:40:51 -0600 1)
9c8635a7 file2 (Izkata 2024-01-01 11:40:27 -0600 2) 4
9c8635a7 file1 (Izkata 2024-01-01 11:40:27 -0600 3) e
9afddd5e file3 (Izkata 2024-01-01 11:40:51 -0600 4)
Also fun fact, -C can be given up to 3 times:1 - Look for the source in files modified in the same commit
2 - Look for the source in any file that existed as of that same commit
3 - Look for the source in any commit
Great for if you suspect the original committer didn't do the delete/add (move) in one commit.