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

Re: git-update-cache: allow dot-files

From
Junio C Hamano <junkio@cox.net>
Date
May 25, 2005, 00:12 UTC
Message-ID
<7vhdgstb7x.fsf@assigned-by-dhcp.cox.net>

Linus, I think this is wrong. GIT_DIR could be something other than ".git". I'd rather allow everything other than . and .. in the core layer, and have Porcelain layer ignore-paths logic to deal with "^.git/" (only when GIT_DIR is .git; otherwise ignore-path configuration file for that particular tree needs to say what to ignore).

    git-update-cache: allow dot-files
    diff --git a/update-cache.c b/update-cache.c
    --- a/update-cache.c
    +++ b/update-cache.c
    @@ -238,13 +238,42 @@ static int refresh_cache(void)
     /*
      * We fundamentally don't like some paths: we don't want
    - * dot or dot-dot anywhere, and in fact, we don't even want
    - * any other dot-files (.git or anything else). They
    - * are hidden, for chist sake.
    + * dot or dot-dot anywhere, and for obvious reasons don't
    + * want to recurse into ".git" either.
      *
      * Also, we don't want double slashes or slashes at the
      * end that can make pathnames ambiguous.
      */
    +static int verify_dotfile(const char *rest)
    +{
    +	/*
Next: Linus Torvalds
Message 1 of 11 in “Re: git-update-cache: allow dot-files”
  1. Junio C HamanoMay 25, 2005
  2. Linus TorvaldsMay 25, 2005
  3. Junio C HamanoMay 25, 2005
  4. Allow dot files in ls-files as well.Junio C Hamano, May 25, 2005
  5. Linus TorvaldsMay 25, 2005
  6. Junio C HamanoMay 25, 2005
  7. Allow dot files in ls-files as well (take #2).Junio C Hamano, May 25, 2005
  8. Linus TorvaldsMay 25, 2005
  9. Junio C HamanoMay 25, 2005
  10. Petr BaudisMay 26, 2005
  11. Junio C HamanoMay 26, 2005

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.