# git objects directory

3 messages from 2005-10-31 to 2005-10-31. Participants: Lexington Luthor, Nikolai Weibull, Johannes Schindelin.
Thread: https://gitlist.dev/t/2281

## Lexington Luthor, 2005-10-31 15:33

Subject: git objects directory
Message-ID: <dk5dgq$isv$1@sea.gmane.org>
URL: https://gitlist.dev/e/dk5dgq%24isv%241%40sea.gmane.org

```
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

```

## Nikolai Weibull, 2005-10-31 16:08

Subject: Re: git objects directory
Message-ID: <20051031160803.GB15802@puritan.petwork>
URL: https://gitlist.dev/e/20051031160803.GB15802%40puritan.petwork
In-Reply-To: <dk5dgq$isv$1@sea.gmane.org>

```
Lexington Luthor wrote:

> 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

-- 
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);}

```

## Johannes Schindelin, 2005-10-31 16:08

Subject: Re: git objects directory
Message-ID: <Pine.LNX.4.63.0510311707001.5839@wbgn013.biozentrum.uni-wuerzburg.de>
URL: https://gitlist.dev/e/Pine.LNX.4.63.0510311707001.5839%40wbgn013.biozentrum.uni-wuerzburg.de
In-Reply-To: <dk5dgq$isv$1@sea.gmane.org>

```
Hi,

On Mon, 31 Oct 2005, Lexington Luthor wrote:

> 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

```
