git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: Eli Barzilay <eli@barzilay.org>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: gitconfig includes
Date: Tue, 29 Nov 2016 16:46:04 -0500	[thread overview]
Message-ID: <20161129214604.c5xcw3d2a5ydpx42@sigill.intra.peff.net> (raw)
In-Reply-To: <CALO-gutJbM=LA3q8vdmbQJLoeCFAJWfPHFo8f1vz-5KJHVxJ6g@mail.gmail.com>

On Tue, Nov 29, 2016 at 02:53:08PM -0500, Eli Barzilay wrote:

> > This already is documented, and I think it is clear enough.
> >
> >        --[no-]includes
> >                   Respect include.* directives in config files when
> >                   looking up values.  Defaults to off when a specific
> >                   file is given (e.g., using --file, --global, etc)
> >                   and on when searching all config files.
> 
> Yeah, that's clear, sorry for not checking the latest.
> 
> [I'd expect/wish it to be on by default though...  Any reason for the
> default being off in these cases?]

It definitely needs to default to off for "-f", as we would not want
surprises when accessing files like ".gitmodules" that come from
untrusted sources.

I think it's arguable whether "--global" should behave the same. It
makes the rule simple: "if you specify a single file, includes default
to off". But I don't think there would be any particular harm. The
existing default was mostly chosen for simplicity and least-surprise
with respect to backwards compatibility.

There's a little more discussion in 9b25a0b52 (config: add include
directive, 2012-02-06).

-Peff

  reply	other threads:[~2016-11-29 21:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-29 19:40 gitconfig includes Eli Barzilay
2016-11-29 19:46 ` Junio C Hamano
2016-11-29 19:53   ` Eli Barzilay
2016-11-29 21:46     ` Jeff King [this message]
2016-11-29 21:50       ` Junio C Hamano
2016-11-30 18:54         ` Eli Barzilay
2016-11-30 19:06           ` Jeff King
2016-11-30 19:42             ` Eli Barzilay

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=20161129214604.c5xcw3d2a5ydpx42@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=eli@barzilay.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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).