2 ms·
When you say "a snapshot", are you meaning "a snapshot of the complete file/folder tree at the point in time of the commit"? While that's true from a mental pe
by justinclift 4y ago
When you say "a snapshot", are you meaning "a snapshot of the complete file/folder tree at the point in time of the commit"?
While that's true from a mental perspective, the on-disk format of most standard commits is indeed a diff.
eg what changed from the previous commit, as output by the diff command
- rmwaite 4y agoWhile it’s true that the packed format does only store some information - it is never a diff file and always pointers to trees and blobs.
- wolfgang42 4y agoI assume you’re referring to packfiles[1], but those are (a) very much an implementation detail (they exist only to save disk space and appear basically nowhere in the git UI), and (b) not diffs—git will pack together whatever blobs its heuristics[2] think “look similar” with no regard for whether they’re actually related to each other, as long as they seem likely to gzip well together. [1] https://git-scm.com/book/en/v2/Git-Internals-Packfiles https://git-scm.com/book/en/v2/Git-Internals-Packfiles [2] https://github.com/git/git/blob/master/Documentation/technical/pack-heuristics.txt https://github.com/git/git/blob/master/Documentation/technic...