From: Jeff King <peff@peff.net>
To: Jacob Keller <jacob.keller@gmail.com>
Cc: Aaron Pelly <aaron@pelly.co>, Git mailing list <git@vger.kernel.org>
Subject: Re: Expanding Includes in .gitignore
Date: Thu, 27 Oct 2016 17:04:59 -0400 [thread overview]
Message-ID: <20161027210458.ptzh4y75dkfaixeo@sigill.intra.peff.net> (raw)
In-Reply-To: <CA+P7+xqmVM-bEc7sZcn+p3qhFUUJvC+rko7CYu+KgyTAeiOifw@mail.gmail.com>
On Thu, Oct 27, 2016 at 12:48:34PM -0700, Jacob Keller wrote:
> > I think the normal behavior in such "foo.d" directory is to just sort
> > the contents lexically and read them in order, as if they were all
> > concatenated together, and with no recursion. I.e., behave "as if" the
> > user had run "cat $dir/*".
>
> Yea, this is the normal behavior, and the user is expected to order
> their files lexically such as "00-name", "50-name" and so on. Pretty
> traditional for a lot of newer configurations.
One thing I will say about this approach is that you can implement it
without any changes in git by doing:
path=.git/info/exclude
cat $path.d/* >$path
and I have seen several config mechanisms basically do that (e.g.,
Debian packaging for a program that doesn't have its own ".d" mechanism,
but needs to grab config provided by several separate packages).
The reason to teach that trick to git is convenience; you don't have to
remember to build the master file from its parts because it's done
dynamically whenever git needs to look at it.
> 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
I'm not convinced this is needed for in-repo .gitignore files. The point
is that you are pulling together separate files that may be administered
independently. But git repositories inherently have a whole-project
view. I'm not sure that separate files buy you a lot there. And the
compatibility issues are more complicated.
I do agree that:
cd .git/info
git clone /my/exclude/repo exclude ;# or exclude.d
should work; ignoring dotfiles when reading the directory solves that,
and is a pretty standard solution.
-Peff
next prev parent reply other threads:[~2016-10-27 21:05 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-27 0:22 Expanding Includes in .gitignore Aaron Pelly
2016-10-27 2:22 ` Stefan Beller
2016-10-27 9:51 ` Aaron Pelly
2016-10-27 8:19 ` Alexei Lozovsky
2016-10-27 10:33 ` Aaron Pelly
2016-10-27 10:50 ` Jeff King
2016-10-27 19:48 ` Jacob Keller
2016-10-27 20:59 ` Aaron Pelly
2016-10-27 21:04 ` Jeff King [this message]
2016-10-27 21:26 ` Aaron Pelly
2016-10-27 21:39 ` Jacob Keller
2016-10-30 3:09 ` Duy Nguyen
2016-10-27 20:28 ` Aaron Pelly
2016-10-27 20:55 ` Jeff King
2016-10-27 21:07 ` Jeff King
2016-10-27 22:30 ` Aaron Pelly
2016-10-27 23:07 ` Aaron Pelly
2016-10-28 2:54 ` Junio C Hamano
2016-10-28 9:32 ` Aaron Pelly
2016-10-30 3:16 ` Duy Nguyen
2016-10-30 12:54 ` Jeff King
2016-10-27 21:55 ` Aaron Pelly
2016-10-27 22:17 ` Aaron Pelly
2016-10-28 8:10 ` Jeff King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161027210458.ptzh4y75dkfaixeo@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=aaron@pelly.co \
--cc=git@vger.kernel.org \
--cc=jacob.keller@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).