git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Shouichi KAMIYA <shouichi.kamiya@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Question about include feature in .gitconfig
Date: Wed, 4 Apr 2012 17:15:04 -0400	[thread overview]
Message-ID: <20120404211504.GA19421@sigill.intra.peff.net> (raw)
In-Reply-To: <CALOHgxG2q_6EN5HFs=btX2hF4jC7AaJuMu=2AqbCeZBD+wNj3w@mail.gmail.com>

On Thu, Apr 05, 2012 at 06:09:41AM +0900, Shouichi KAMIYA wrote:

> I have a question about "include" feature in config file.
> In .gitconfig I included .my_super_secret_file like below.
> 
> # .gitconfig
> [include]
>     path = .my_super_secret_file
> 
> # .my_super_secret_file
> [github]
>     password = foobar
> 
> Now, my question is return value of "git config --global github.password".
> I expect it to return foobar but it returns nothing. Is this behavior expected?

Yes, that's the expected behavior. Includes are not followed by default
when you ask for the value from a _specific_ file, as you do with
"--global".

If you do "git config github.password", you will get the answer you
want. You can also use "git config --includes --global github.password"
if you want to search only ~/.gitconfig, but following includes.

-Peff

      reply	other threads:[~2012-04-04 21:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-04 21:09 Question about include feature in .gitconfig Shouichi KAMIYA
2012-04-04 21:15 ` Jeff King [this message]

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120404211504.GA19421@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=shouichi.kamiya@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.
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 NNTP newsgroup(s).