Hacker News new | ask | show | jobs
by lann 1894 days ago
> aren’t commits isomorphic to diffs?

Nearly, though renames are only approximately extracted from the snapshots.

1 comments

If your VC isn't plumbed all the way into your editor, you can't tell changing a typo from deleting and re-typing the whole file when it comes time to create a delta.
There is a `git mv` command that means "rename". Git could (even with its current data model) explicitly annotate commits with this intent, but doesn't. I don't know how useful that would be compared to the current heuristics, but it does mean that git commit "snapshots" are not (quite) isomorphic to a diff format (like posix diff's) that can explicitly encode renames.