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

Re: Git attributes ignored for root directory

From
Michael Haggerty <mhagger@alum.mit.edu>
Date
Oct 12, 2011, 22:35 UTC
Message-ID
<4E961626.4030201@alum.mit.edu>
In-Reply-To
<7vd3eb8hkb.fsf@alter.siamese.dyndns.org>
On 10/05/2011 07:38 PM, Junio C Hamano wrote:
>  - If the pattern is a single dot and nothing else, it matches everything
>    in the current directory.

This disagrees with shell usage, where "." represents a directory itself, not the files within a directory. By the trailing slash rule that you quoted, "./" should also represent the containing directory.

Given that git currently tries to ignore directories and only think about files, the consistent thing to do would be to declare "." and "./" as undefined. Because someday git *may* want to get a bit smarter about directories, and at that time it would be a shame not to have "." and/or "./" available to represent the containing directory. (But implementing it will require some special-casing within the attr module, which is currently pretty stupid.)

Michael
-- 
Michael Haggerty
mhagger@alum.mit.edu
http://softwareswirl.blogspot.com/
Previous: Junio C HamanoNext: Junio C Hamano
Message 9 of 13 in “Git attributes ignored for root directory”
  1. Gioele BarabucciOct 4, 2011
  2. Michael HaggertyOct 5, 2011
  3. Gioele BarabucciOct 5, 2011
  4. Junio C HamanoOct 5, 2011
  5. Gioele BarabucciOct 5, 2011
  6. Junio C HamanoOct 5, 2011
  7. Gioele BarabucciOct 5, 2011
  8. Junio C HamanoOct 5, 2011
  9. Michael HaggertyOct 12, 2011
  10. Junio C HamanoOct 12, 2011
  11. Gioele BarabucciOct 13, 2011
  12. Johannes SixtOct 13, 2011
  13. Junio C HamanoOct 13, 2011

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.