Re: [RFC PATCH] Re: Empty directories...
- From
Linus Torvalds <torvalds@linux-foundation.org>
- Date
- Jul 22, 2007, 17:28 UTC
- Message-ID
- <alpine.LFD.0.999.0707221023530.3607@woody.linux-foundation.org>
- In-Reply-To
- <85abtpoydg.fsf@lola.goethe.zz>
On Sun, 22 Jul 2007, David Kastrup wrote:
Show 5 quoted lines
> > > I told you. Several times. That "." is pointless exactly because > > it's in _every_ tree, and as such is no longer "content". > > "." is in every _non-empty_ directory tree.
You're pointless.
We have no problems at all with non-empty trees. We know exactly what they are. We keep track of them fine, and we do not need a totally pointless "." entry for them.
> But we are talking about > permitting _empty_ trees in the repository.
And WE ALREADY DO.
The empty tree looks like this: "". It has a SHA1 of 4b825dc642cb6eb9a060e54bf8d69288fbee4904. It works today, and in fact, git uses it already.
Try this:
git ls-tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904
in the git repository. What do you think that is?
Your "." is *pointless*.
And it's _worse_ than pointless: it's not "content". It doesn't add any information. It's not something you can match up against the working tree meaningfully, exactly because *every* working tree has it. As such, it's total non-information.
Linus