git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Robert P. J. Day" <rpjday@crashcourse.ca>
To: Git Mailing list <git@vger.kernel.org>
Subject: man page for "git config" re: GIT_CONFIG and "-f" seems weird/wrong
Date: Sat, 14 Oct 2017 05:55:49 -0400 (EDT)	[thread overview]
Message-ID: <alpine.LFD.2.21.1710140538090.5453@localhost.localdomain> (raw)


  (apologies to those whose email systems barfed on my domain being
badly configured WRT MX record, i have been assured by my admin it's
been fixed.)

  reading "man git-config", first, it seems awkward that the "-f"
option is explained in terms of GIT_CONFIG even when that variable
hasn't been introduced yet:

  -f config-file, --file config-file
     Use the given config file instead of the one specified by GIT_CONFIG.

the way that's worded makes it seem like GIT_CONFIG *must* have a
value somewhere that is being overridden. perhaps a more general
explanation would be something like, "Explicitly use this, and *only*
this config file, regardless of other possible config settings."

  it might also be worth mentioning that, once you specify this
option, also using any of --local, --global or --system will result in
an error:

  $ git config -l -f ~/gitc --global
  error: only one config file at a time.
  ... snip ...

  related to this, under "ENVIRONMENT", the explanation for GIT_CONFIG
seems somewhat draconian:

  GIT_CONFIG
    Take the configuration from the given file instead of .git/config.
    Using the "--global" option forces this to  ~/.gitconfig. Using
    the "--system" option forces this to $(prefix)/etc/gitconfig.

the word "forces" seems a bit heavy-handed, and the explanation is
misleading, anyway ... if you've already set GIT_CONFIG, then using
any other option of --local, --global or --system produces the same
error as before:

  $ git config -l --system
  error: only one config file at a time.
  $

in other words, if GIT_CONFIG is already set, using --global or
--system doesn't "force" anything, it's simply an error, no?

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================

                 reply	other threads:[~2017-10-14  9:55 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=alpine.LFD.2.21.1710140538090.5453@localhost.localdomain \
    --to=rpjday@crashcourse.ca \
    --cc=git@vger.kernel.org \
    /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).