From: Junio C Hamano Date: Wed, 25 May 2005 00:12:34 GMT Subject: Re: git-update-cache: allow dot-files 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) +{ + /*