git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: Sebastian Schuberth <sschuberth@gmail.com>
Cc: Raphael Stolt <raphael.stolt@gmail.com>,
	Git Mailing List <git@vger.kernel.org>
Subject: Re: Possible bug in includeIf / conditional includes on non git initialised directories
Date: Thu, 11 May 2017 19:43:00 -0400	[thread overview]
Message-ID: <20170511234259.gnbr6aiu26oqysxo@sigill.intra.peff.net> (raw)
In-Reply-To: <5735fdc6-85de-491c-481d-9d0c18912ee6@gmail.com>

On Thu, May 11, 2017 at 10:31:14PM +0200, Sebastian Schuberth wrote:

> On 2017-05-11 20:53, Raphael Stolt wrote:
> 
> > I might have stumbled this time over a real bug in includeIf / conditional includes or maybe it's just as intended.
> > 1) Given I have a correct configured includeIf and I’m issuing `git config --show-origin --get user.email` against an directory which hasn’t been `git init`ed I get the user.email configured globally.
> 
> I don't think that's a bug surprise: The condition in the conditional
> include is "gitdir:". Before running "git init", it simply *is* no
> gitdir.

Yeah, I think all is working as intended. A "cwd:" conditional seems
like it would be useful, but I think it would have a lot of corner
cases. It may change over the course of a program, and you have
weirdness with things like "git --git-dir=/some/other/path", where your
cwd and the git repository you're looking at are totally unrelated.

-Peff

  reply	other threads:[~2017-05-11 23:43 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-15 15:52 [Bug report] includeIf config is not displayed in normal directories Stuart MacDonald
2017-05-11 18:53 ` Possible bug in includeIf / conditional includes on non git initialised directories Raphael Stolt
2017-05-11 20:31   ` Sebastian Schuberth
2017-05-11 23:43     ` Jeff King [this message]
2017-05-12  8:58   ` Ævar Arnfjörð Bjarmason
2020-12-15 23:03     ` [Bug report] includeIf config is not displayed in normal directories Ævar Arnfjörð Bjarmason
2020-12-16  0:23       ` Junio C Hamano
2020-12-15 22:23 ` Junio C Hamano
2020-12-16 19:24   ` Jeff King
2020-12-16 20:43     ` Stuart MacDonald
2020-12-16 23:24       ` Junio C Hamano
2020-12-18  6:23         ` 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=20170511234259.gnbr6aiu26oqysxo@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=raphael.stolt@gmail.com \
    --cc=sschuberth@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).