git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Possible bug in includeIf / conditional includes on non git initialised directories

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
May 12, 2017, 08:58 UTC
Message-ID
<CACBZZX7-Gw7G7yY=ah6AQCJKzWKB002iAo6RNJwZmvMRe4Pd+w@mail.gmail.com>
In-Reply-To
<F55DC360-9C1E-45B9-B8BA-39E1001BD620@gmail.com>
On Thu, May 11, 2017 at 8:53 PM, Raphael Stolt <raphael.stolt@gmail.com> wrote:
Show 10 quoted lines
> Hi there,
>
> 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.
> 2) Given I have a correct configured includeIf and I’m issuing `git config --show-origin --get user.email` against an directory which has been `git init`ed I get the user.email configured conditionally.
> For 1) I would probably expect to get the user.email configured conditionally even for a plain directory.
>
> More details see this (http://stackoverflow.com/questions/43919191/git-2-13-conditional-config-on-windows/) Stack Overflow question.
> Best regards,
> Raphael Stolt

The "this is how this works" has been covered already by others, but can you elaborate on the use-case, why does it matter for you that "git config" doesn't show your user.email when you have no git dir there, I can't think of a reason for why this would matter since there's no .git there, so there's no way anything can use the config info at that location.

Previous: Jeff King
Message 4 of 4 in “Possible bug in includeIf / conditional includes on non git initialised directories”
  1. Raphael StoltMay 11, 2017
  2. Sebastian SchuberthMay 11, 2017
  3. Jeff KingMay 11, 2017
  4. Ævar Arnfjörð BjarmasonMay 12, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.