git objects directory
Hi,
Can someone please explain why git puts its objects in 256 sub-directories of objects instead of directly in the objects directory itself? I am trying to learn git (actually cogito), but I still don't understand why this structure is used.
What is the point of having the first byte of the hash as the directory name?
-- LL
Quoted 4 lines · Lexington Luthor
Can someone please explain why git puts its objects in 256 sub-directories of objects instead of directly in the objects directory itself? I am trying to learn git (actually cogito), but I still don't understand why this structure is used.
Because otherwise there would be a lot of objects (files) in the objects subdirectory, which would cause a lot of problems with many filesystems.
Anyway, you best leave that directory be, but I understand your desire to understand :-).
nikolai
Signature · 3 lines
Nikolai Weibull: now available free of charge at http://bitwi.se/!
Born in Chicago, IL USA; currently residing in Gothenburg, Sweden.
main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}Hi,
Quoted 3 lines · Lexington Luthor
Can someone please explain why git puts its objects in 256 sub-directories of objects instead of directly in the objects directory itself?
Some filesystems have problems with huge directories. And originally the plan was to have all objects as files (now the older ones live in packs).
Hth,
Dscho