git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: GitAttributes feature export-ignore works, but -export-ignore (with dash) should also work

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 21, 2019, 13:29 UTC
Message-ID
<xmqq5zjd8ij2.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<20191121075837.GA30966@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 9 quoted lines
> Now obviously there is recursion happening inside git-archive, as it
> walks the tree. And the current behavior is that it sees the ignored
> subtree and doesn't walk into it at all. So it _could_ make your
> original example work by actually searching within the tree for any
> paths marked -export-ignore, and including the directory if and only if
> it has unignored entries.
>
> I can't offhand think of anything that would break if we started doing
> that,...

If there is some effect we want to attach to a directory itself without affecting the paths inside it, the current and original design lets you express it naturally. If we make a pattern that match a directory to recurse, it is still possible to express it, but it is a bit cumbersome, e.g.

	/directory	want-to-affect-this
	/directory/**	-want-to-affect-this
I would think.

Git generally does *not* track directories, so in a sense it is arguable if it even makes sense to think about attaching an attribute to a directory itself (as opposed to a non-directory inside the directory) in the first place, though.

Previous: Jeff KingNext: Jeff King
Message 3 of 6 in “GitAttributes feature export-ignore works, but -export-ignore (with dash) should also work”
  1. M LewisNov 20, 2019
  2. Jeff KingNov 21, 2019
  3. Junio C HamanoNov 21, 2019
  4. Jeff KingNov 22, 2019
  5. M LewisNov 21, 2019
  6. Jeff KingNov 22, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.