Sharan Basappa <sharan.basa...@gmail.com> writes:
> The other question is, when it is time for Git to pick up the file 
> associated with 100644 blob 0215040f90f133f999bac86eede7565c6d09b93d then 
> it starts 
> computing checksum of all the objects?

The point is that it doesn't have to *search* for the contents of the
file, because those contents are stored in

./git/objects/02/15040f90f133f999bac86eede7565c6d09b93d

The hash of an object tells Git where the object is stored.

This is why a *cryptographic* hash must be used, so that no two
different objects have the same hash, which would require that they both
be stored in the same file.

There is the complication that a file's contents are stored compressed,
so you can't directly read the file, which is why you need to use a Git
command to get the proper file contents.

There is also the complication that "pack files" can be made that
contain many objects.  Each pack file has a corresponding index listing
all the hashes of the objects in the pack file.  Clearly, the indexes
are arranged in some way that allows Git to quickly find what objects
are in which pack file, but I do not know the details.

Dale

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to