All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Philip Oakley <philipoakley@iee.org>
Cc: GitList <git@vger.kernel.org>, "Jeff King" <peff@peff.net>,
	"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
	"Robert Clausecker" <fuz@fuz.su>,
	"Alex Riesen" <raa.lkml@gmail.com>,
	"Tanay Abhra" <tanayabh@gmail.com>
Subject: Re: [PATCH] doc git: multivar configuration parameters append to existing values
Date: Mon, 16 Jun 2014 11:43:32 -0700	[thread overview]
Message-ID: <xmqqd2e8r8yz.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <1402922952-172-1-git-send-email-philipoakley@iee.org> (Philip Oakley's message of "Mon, 16 Jun 2014 13:49:12 +0100")

Philip Oakley <philipoakley@iee.org> writes:

> When the '-c' option is used to pass alternate URLs or similar
> multivar parameters to git commands the effect is not what the user
> expected [1,2].
>
> Clarify that multivar configuration parameters do not supercede
> previous values. Suggest an alternative style parameter.
>
> [1] http://article.gmane.org/gmane.comp.version-control.git/250427
> [2] http://article.gmane.org/gmane.comp.version-control.git/251529
>
> Signed-off-by: Philip Oakley <philipoakley@iee.org>
> ---
>  Documentation/git.txt | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/git.txt b/Documentation/git.txt
> index 3bd68b0..bedbd76 100644
> --- a/Documentation/git.txt
> +++ b/Documentation/git.txt
> @@ -440,7 +440,10 @@ example the following invocations are equivalent:
>  
>  -c <name>=<value>::
>  	Pass a configuration parameter to the command. The value
> -	given will override values from configuration files.
> +	given will override single valued variables from configuration
> +	files, and append to multivar variables. Previous multivar values
> +	remain in effect. Use "insteadOf" style config variables when an
> +	over-ride is needed.
>  	The <name> is expected in the same format as listed by
>  	'git config' (subkeys separated by dots).

I have two doubts, while appreciating the overall direction to
clarify things very much.

 * "single overrides, multiple appends" is not a wrong explanation
   per-se, but sounds like an arbitrary rule that forces people to
   memorize.  I wonder if it makes it less burdensome for readers if
   we just said "Git acts as if the given configuration is specified
   at the very end of the configuration files"---once the reader
   understands that Git reads all configuration varilables of the
   same name and the code paths that *use* one of them pick the one
   defined the last, it is easy to realize that "single overrides"
   is merely a natural consequence of the appending nature of "-c".

 * The last sentence added, i.e. "insteadof"-style, will not be
   understood by any reader other than those who tried to use "-c"
   on remote.*.url variables and does not belong here.  A better
   way/place to give that information is needed.

  parent reply	other threads:[~2014-06-16 18:43 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-16 12:49 [PATCH] doc git: multivar configuration parameters append to existing values Philip Oakley
2014-06-16 18:35 ` Tanay Abhra
2014-06-16 19:42   ` Philip Oakley
2014-06-16 18:43 ` Junio C Hamano [this message]
2014-06-16 19:38   ` Philip Oakley
2014-06-16 21:10     ` Junio C Hamano
2014-06-17 22:03       ` Philip Oakley
2014-06-16 19:48   ` 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=xmqqd2e8r8yz.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox.com \
    --cc=avarab@gmail.com \
    --cc=fuz@fuz.su \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    --cc=philipoakley@iee.org \
    --cc=raa.lkml@gmail.com \
    --cc=tanayabh@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.