git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Guilherme <guibufolo@gmail.com>
Cc: "git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: Fwd: git clone does not respect command line options
Date: Fri, 26 Feb 2016 02:59:48 -0500	[thread overview]
Message-ID: <20160226075948.GA26994@sigill.intra.peff.net> (raw)
In-Reply-To: <CAMDzUty5oWjS=4kvvYL7XNCY=xHm3N=+kaeT_zTtpkaMakMrmA@mail.gmail.com>

On Fri, Feb 26, 2016 at 01:16:39PM +0530, Guilherme wrote:

> Is there any documentation on which variables are muli-valued?

There's no central registry. It's often mentioned in the documentation
for a particular config option, but it looks like the credential.*
config is not very clear about this.

There aren't very many of them. I think credential.* is one set. The
remote.*.fetch/push refspecs are another. I don't think there are any
others used by git itself, but I may just be forgetting them.

> git -c credential.helper="store --file=creds" config --get credential.helper
> 
> only returns one value.
> 
> How can i even know if there are multiple set. I mean someone might
> have just created an extra credential.helper in `--system` that I'm
> not expecting...

Right. The "git-config" program doesn't know about the semantics of
particular values (remember that in the early days, there were many
porcelains which built on top of git, and they could all store their own
config). Using "--get" implements "last one wins" semantics, which
is what most config variables want. You can use "--get-all" to see all
instances of a multi-valued variable.

The usability on all of this is obviously pretty horrible, but it's hard
to change at this point without breaking backwards compatibility.

-Peff

  reply	other threads:[~2016-02-26  7:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAMDzUtzoiJWzckTX818HJV=su0eEP35gsNDJ=+k_me08EDvxRg@mail.gmail.com>
2016-02-26  6:47 ` Fwd: git clone does not respect command line options Guilherme
2016-02-26  7:34   ` Jeff King
2016-02-26  7:46     ` Guilherme
2016-02-26  7:59       ` Jeff King [this message]
2016-02-26  8:15         ` Jacob Keller
2016-02-26  8:24           ` Jeff King
2016-02-26  8:34             ` Duy Nguyen
2016-02-26  8:45               ` Jeff King
     [not found]             ` <CAMDzUtwG9pLz6CqxVEaw5xcZwQ2Ni37h_R45+frzJrRshgpZQg@mail.gmail.com>
2016-02-26  9:57               ` Jeff King
2016-02-26 16:59     ` Junio C Hamano
2016-02-28  3:37       ` Guilherme
     [not found]       ` <CAMDzUtxnSeTrfBWWqeOVQm30x5nE6fC9LSx=YNSws2h24TmchQ@mail.gmail.com>
2016-02-28  5:01         ` 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

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

  git send-email \
    --in-reply-to=20160226075948.GA26994@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=guibufolo@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).