4 ms·
> What is missing, from the users point of view, when they model commits as diffs+parents vs as snapshots? With the wrong mental model it's harder to predict w
by haberman 6y ago
> What is missing, from the users point of view, when they model commits as diffs+parents vs as snapshots?
With the wrong mental model it's harder to predict what operations are expensive. If "git checkout <SHA>" truly did have to replay all diffs from the beginning of time, it would be a very expensive operation that is best avoided unless you absolutely need it. But in practice it is a very fast operation (one of the fastest) that there is no need to shy away from.
- taberiand 6y agoA fair point possibly, but given checkout/switching branches is probably just about the most common action when working with git repos, I'd hope people would notice that it's fast pretty quickly.