···40934093about the data in the object. It's worth noting that the SHA-1 hash
40944094that is used to name the object is the hash of the original data
40954095plus this header, so `sha1sum` 'file' does not match the object name
40964096-for 'file'.
40964096+for 'file' (the earliest versions of Git hashed slightly differently
40974097+but the conclusion is still the same).
40984098+40994099+The following is a short example that demonstrates how these hashes
41004100+can be generated manually:
41014101+41024102+Let's assume a small text file with some simple content:
41034103+41044104+-------------------------------------------------
41054105+$ echo "Hello world" >hello.txt
41064106+-------------------------------------------------
41074107+41084108+We can now manually generate the hash Git would use for this file:
41094109+41104110+- The object we want the hash for is of type "blob" and its size is
41114111+ 12 bytes.
41124112+41134113+- Prepend the object header to the file content and feed this to
41144114+ `sha1sum`:
41154115+41164116+-------------------------------------------------
41174117+$ { printf "blob 12\0"; cat hello.txt; } | sha1sum
41184118+802992c4220de19a90767f3000a79a31b98d0df7 -
41194119+-------------------------------------------------
41204120+41214121+This manually constructed hash can be verified using `git hash-object`
41224122+which of course hides the addition of the header:
41234123+41244124+-------------------------------------------------
41254125+$ git hash-object hello.txt
41264126+802992c4220de19a90767f3000a79a31b98d0df7
41274127+-------------------------------------------------
4097412840984129As a result, the general consistency of an object can always be tested
40994130independently of the contents or the type of the object: all objects can
···41234154----------------------------------------------------
4124415541254156The initial revision lays the foundation for almost everything Git has
41264126-today, but is small enough to read in one sitting.
41574157+today (even though details may differ in a few places), but is small
41584158+enough to read in one sitting.
4127415941284160Note that terminology has changed since that revision. For example, the
41294161README in that revision uses the word "changeset" to describe what we