Edit: I was wrong, however I learned from the conversation so I am leaving it here! Thanks to those who corrected me.
On the other hand, source files being mostly text, they are more intelligently handled and typically only differences between revisions are stored in the commits.
This is completely incorrect, git stores whole blobs from one commit to the other.
svn stored patches, but git does not. Every version of a file is stored in its entirety in your git tree since the beginning of the repository's existence. This is one of the reasons why git is so fast. You can go through your objects in your .git directory and verify this for yourself[0].
This is only true for recent commits: as you accumulate commits, garbage collections are performed of the loose blobs and the remaining generation is stored into a pack file, which has been carefully ordered by similarity and stored using a delta-encoding. For more information, this chapter from one of the popular online books about git might suffice.
(edit: After I started responding to your comment, you edited your comment to link to the same book! I recommend you continue reading the later chapters: "you'll never believe how it works" ;P.)
Comments
Edit: I was wrong, however I learned from the conversation so I am leaving it here! Thanks to those who corrected me.
This is completely incorrect, git stores whole blobs from one commit to the other.
svn stored patches, but git does not. Every version of a file is stored in its entirety in your git tree since the beginning of the repository's existence. This is one of the reasons why git is so fast. You can go through your objects in your .git directory and verify this for yourself[0].
[0] https://git-scm.com/book/en/v2/Git-Internals-Git-ObjectsThis is only true for recent commits: as you accumulate commits, garbage collections are performed of the loose blobs and the remaining generation is stored into a pack file, which has been carefully ordered by similarity and stored using a delta-encoding. For more information, this chapter from one of the popular online books about git might suffice.
https://git-scm.com/book/en/v2/Git-Internals-Packfiles
(edit: After I started responding to your comment, you edited your comment to link to the same book! I recommend you continue reading the later chapters: "you'll never believe how it works" ;P.)
False, git can do both. Run a git gc and check those files again. Chances are, many of your loose object files are missing, but everything still works
While not stored as 'text patches', when the objects are packed (as in pack files), they are stored as binary diffs.