Subject: Re: [RFC] Plumbing-only support for storing object metadata

From: Jan Hudec <[email-masked]>
Date: Sun, 10 Aug 2008 20:11:16 +0200

On Sun, Aug 10, 2008 at 19:57:35 +0200, Stephen R. van den Berg wrote:
> Jan Hudec wrote:
> >On Sun, Aug 10, 2008 at 05:16:47 -0700, [email-masked] wrote:
> >> On Sun, 10 Aug 2008, Stephen R. van den Berg wrote:
> >>> However, pondering the idea a bit more, I could envision something
> >>> similar to the following:
> 
> >.... provided the two entries under the same name wouldn't drive the internal
> >logic completely mad, I quite like this. Note by the way, that you need to
> >allow for two trees too, because you may want to store attributes for
> 
> Well, in theory yes, but currently git doesn't store directories.

It depends. It does store directories in the tree objects, it just does not
do that in index. And we are talking about tree objects, where git does store
directories.

Besides, that is irrelevant to storing attributes for directories -- the
attribute objects are not themselves directories, so git would store them
just fine.

> How about extending git-core to allow for storage of directories by
> virtue of the following object in a tree:
> 
> 040000 blob e69de29bb2d1d6434b8b29ae775ad8c2e48c5391  .
> 
> I.e. the hash belongs to the empty blob.

Sorry, but this is insane. If git was to store anything for empty
directories, it would be empty tree, not a tree containing empty blob called
'.'. There was even a prototype patch to do that sent to the list (I believe
it was from Linus and was part of an argument along the lines "you could do
it like this, so stop talking and finish it if you have good enough reason to
want it (which you obviously don't)").

> Normally you don't (have to) store these directory blobs, but if you
> insist on having them, git will create the empty directory on checkout
> (i.e. you wouldn't need the dummy file trick anymore to force the
> directory to be present).

No, I don't give a damn about directories themselves. I want to store their
attributes, which is completely different thing.

-- 
						 Jan 'Bulb' Hudec <[email-masked]>