Hacker News new | ask | show | jobs
by mdaniel 3031 days ago
patches on mailing lists before git, are those also somehow transferred to the repo

Given that conceptually git is just a linked list of patches, I can't imagine why they wouldn't have that history

3 comments

Actually that's what VCSs before git used to be and what git changed. Git doesn't keep patches, it keeps full states of the repository in a content addressable fashion. It's one of its key insights. Instead of having to have an always correct way to encode deltas just encode the state itself and leave it to the tools to figure out what the diff should be. That way you're not encoding in your disk format something that can be done better in a later version of the tool.
That said, git doesn't just store direct copies either. It will bundle things up into packfiles as it calls them to do compression and encoding of various forms to reduce disk space and make it quicker to find a given version of a file

https://git-scm.com/book/en/v2/Git-Internals-Packfiles

Git the tool does packfiles but that's an implementation detail. Git the VCS can work with any object storage backend.
Well, I don't think anyone has the complete history in terms of patches. It just doesn't exist, without being reconstructed.
> Given that conceptually git is just a linked list of patches, I can't imagine why they wouldn't have that history

You can construct a linked list of patches for any series of commits, but git doesn't actually store patches or diffs - only raw content.