Re: [RFC PATCH] Re: Empty directories...
From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2016-06-15 22:43:23
On Sun, 22 Jul 2007, David Kastrup wrote:
quoted
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