On Tue, Apr 02, 2013 at 09:43:30AM -0700, Junio C Hamano wrote:
> > In some systems, yes, but git does not have any notion of "doc/" as an
> > item (after all, we track content in files, not directories), so I do
> > not see what it means to specify a directory except to say "everything
> > under it has this property".
> That was true back when gitattributes (and ignore) was defined to
> apply only to the paths we track. But export-ignore abuses the
> attrtibute system, allows a directory to be specified in the match
> pattern, and we declared that is a kosher use by the patch that
> caused 1.8.1.X regression, no? So "Git does not have any notion of
> "doc/' as an item" is no longer true, I think.
Yes, but as I explained later, the meaning of "apply an attribute to
dir" in such cases is always equivalent to "apply attribute
recursively to dir/*". So I do not think we are violating that rule to
recursively apply all attributes.
But let's take a step back. I think Jan is trying to do a very
reasonable thing: come up with the same set of paths that git-archive
would. What's the best way to solve that? Recursive application of
attributes is one way, but is there another way we could help with
git ls-tree --name-only -zrt HEAD |
git check-attr --stdin -z export-ignore
means we can find out that "foo/" is ignored. But he would have to
manually post-process the output to see that "foo/bar" is below "foo".
Not impossible, but I just wonder if git can be more helpful in figuring
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html