News for hackers. Stuff that matters.
Re:Git is too hard by zzbzq on Tuesday November 17, 2020 @09:33AM (#25124126)
Each commit consists of a structured collection of hash IDs for every file in the entire repo. The hash ID is generated by hashing the contents of the entire file. Not the diff.

The "diff" you're referring to is an implementation detail of the compression. It's not even always there; it depends on which commits are present in your clone. It's also not even the same "diff" you work with when you use git to generate or apply patches. Using the same word only leads to confusion.

Re:Git is too hard by SAI_Peregrinus on Wednesday November 18, 2020 @09:53AM (#25137375)
And that's part of the problem with git! It requires you to get a mental model of how it works internally, but only part of how it works internally is important, and there are terminology conflicts. So people get incorrect ideas about how it works, then get surprised when something unexpected happens.