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

Re: check-attr doesn't respect recursive definitions

From
Jeff King <peff@peff.net>
Date
Apr 2, 2013, 16:30 UTC
Message-ID
<20130402163034.GA19252@sigill.intra.peff.net>
In-Reply-To
<7vtxnogbft.fsf@alter.siamese.dyndns.org>
On Tue, Apr 02, 2013 at 09:11:02AM -0700, Junio C Hamano wrote:
Show 7 quoted lines
> Jeff King <peff@peff.net> writes:
> 
> > Yes, it is the expected behavior, though I cannot offhand think of
> > anything that would break if we did apply it recursively.
> 
> Conceptually that breaks our brain.  "All files in doc/ directories
> are text" and "doc/ directory is text" are two different things, no?

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".

We already treat "foo/" in gitignore this way (i.e., "everything under foo is ignored"). And we treat export-ignore the same way in git-archive.

I agree that saying "Documentation diff=text" is not something I would expect people to do, but what _should_ it do? Recursively applying under the directory seems a sane option. I would not want to paint us into a corner, but I cannot think of any other reasonable thing to do with it (which is why I phrased it as "I cannot think of anything that would break", and not "this is a great idea"; counterpoints are welcome).

I am sympathetic to Jan's issue, though. If git were consistent about applying attributes only to paths, then the repo owner would have written "dir/* export-ignore", not "dir". But it is not, and git-archive does ask for attributes on directories, but without providing a good mechanism for doing those attribute lookups from external programs.

-Peff
Previous: Junio C HamanoNext: Junio C Hamano
Message 5 of 13 in “check-attr doesn't respect recursive definitions”
  1. Jan LarresMar 30, 2013
  2. Jeff KingApr 2, 2013
  3. Jeff KingApr 2, 2013
  4. Junio C HamanoApr 2, 2013
  5. Jeff KingApr 2, 2013
  6. Junio C HamanoApr 2, 2013
  7. Jeff KingApr 2, 2013
  8. Jeff KingApr 2, 2013
  9. Junio C HamanoApr 2, 2013
  10. Jeff KingApr 2, 2013
  11. Jan LarresApr 3, 2013
  12. Duy NguyenApr 5, 2013
  13. Jan LarresApr 5, 2013

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.