From: Aaron Pelly Date: Thu, 27 Oct 2016 20:59:48 GMT Subject: Re: Expanding Includes in .gitignore Message-ID: <067f4a57-2382-07e3-6873-79af78b4a9a1@pelly.co> In-Reply-To: On 28/10/16 08:48, Jacob Keller wrote: > I would strongly prefer rc.d style directories either with a "if the > .gitignore is a directory treat it like rc.d" or even "add support for > .gitignore.d as well as .gitignore" I think adding .gitignore.d shouldn't break existing systems, is intuitive, and solves my issue. Does git know when it is in a repo that is too new to comprehend? My current thinking is that anywhere a .gitignore can go, so can a .gitignore.d (named appropriately of course.) Any existing .gitignore should take precedence to the result of parsing the directory. I haven't looked at the implementation of precedence yet, but I'd be surprised if the existing mechanism can't be employed. > One thing to keep in mind would be that we should make sure we can > handle the .gitignore being a submodule or a git repository, so that > users could just do something like > > "git submodule add .gitignore and then track git ignore > contents from a repository in a nice way. > > By this I mean that the reading of files in .gitignore directory > should exclude reading .git or other hidden files in some documented > manor so as to avoid problems when linking to a git directory for its > contents. Nice! I like this a lot.