Btw, don't get me wrong: I think that in order to be better at tracking
other SCM's idiotic choices, we could (and I foresee that we eventually
have to) try to track empty directories as a special case too.
So I'm not _against_ the notion of tracking empty directories, and I would
welcome patches that do so. As I mentioned in some earlier thread when
this came up a few weeks ago, I actually suspect that the "subproject"
support probably ended up making it easier, because in many ways an "empty
directory" is very close to a "anonymous subproject" from a low-level
plumbing standpoint (even if it is *not* so from a high-level standpoint).
So I suspect that adding support for empty directories ends up being about
just slightly extending the places that now have subproject support to
know about a new situation.
But I do want to point out that "tracking a directory" is not at all the
same thing as "tracking a file", no matter how much you try to argue
otherwise. The semantics are totally different, and it all boils down to
the fact that when you track a file, you are always talking about the
*full* content of the file, while tracking a directory is always about
tracking just a *subset* of the contents of the directory.
Of course, with directories, there's the trivial case where the subset
happens to be everything, but that is neither the common nor the
interesting case. All the interesting and complex cases happen exactly
when the directory has untracked files in it, and at that point
- you really aren't tracking "contents" any more
- you can no longer recreate the directory from the data you have (so you
cannot remove it on branch switches etc)
- ergo: you're not a content tracker any more, you're a "container"
tracker.
And really, the "nontracked files in a directory" is the *default* thing,
not some really unusual thing that we could disallow.
But I'm not against adding support for "container tracking". I just want
people to understand that it's something totally different from what we do
now. It's much more like subproject support than tracking files.
Linus
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html