All of lore.kernel.org
 help / color / mirror / Atom feed
* curious about wording in "man git-config", ENVIRONMENT
@ 2018-06-26 10:18 Robert P. J. Day
  2018-06-26 12:43 ` Jeff King
  0 siblings, 1 reply; 4+ messages in thread
From: Robert P. J. Day @ 2018-06-26 10:18 UTC (permalink / raw)
  To: Git Mailing list


  ENVIRONMENT
    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.

  is the phrase "forces this to" really what you want to use here?
maybe i misunderstand what this option does, doesn't it simply mean
that it will use a different (specified) file from the default,
depending on the context (local, global, system)?

  it just seems weird to say that the option "forces" the use of what
are clearly the default files. thoughts?

rday

-- 

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

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: curious about wording in "man git-config", ENVIRONMENT
  2018-06-26 10:18 curious about wording in "man git-config", ENVIRONMENT Robert P. J. Day
@ 2018-06-26 12:43 ` Jeff King
  2018-06-26 16:51   ` Robert P. J. Day
  0 siblings, 1 reply; 4+ messages in thread
From: Jeff King @ 2018-06-26 12:43 UTC (permalink / raw)
  To: Robert P. J. Day; +Cc: Git Mailing list

On Tue, Jun 26, 2018 at 06:18:26AM -0400, Robert P. J. Day wrote:

> 
>   ENVIRONMENT
>     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.
> 
>   is the phrase "forces this to" really what you want to use here?
> maybe i misunderstand what this option does, doesn't it simply mean
> that it will use a different (specified) file from the default,
> depending on the context (local, global, system)?
> 
>   it just seems weird to say that the option "forces" the use of what
> are clearly the default files. thoughts?

I agree it's weird. I think it's trying to mean "behaves as if it was
set to", but with the additional notion that the command-line argument
would take precedence over the environment (which is our usual rule).
But then we should just say those things explicitly.

Just looking at mentions of GIT_CONFIG in that manpage and knowing the
history, I think:

 - the environment section should say something like:

     GIT_CONFIG
       If set and no other specific-file options are given, behaves as
       if `--file=$GIT_CONFIG` was provided on the command-line.

 - possibly the manpage should mention that GIT_CONFIG is historical and
   should not be used in new code (we could also consider an actual
   deprecation period and removal of the feature, though aside from
   documentation confusion I do not think it is hurting anyone)

 - the description of --file should not mention it at all. Instead it
   should reference the "FILES" section which describes the whole lookup
   sequence

 - mention of GIT_CONFIG should be dropped from the FILES section. We
   don't want to point people towards using it. And if they come across
   it in the wild, they can find it in the ENVIRONMENT section.

 - references to "--global" should stop mentioning ~/.gitconfig,
   since in a post-XDG world it could be elsewhere (they're better to
   refer to the "--global" description or the FILES section)

 - references to "--system" should stop mentioning $(prefix)/etc/gitconfig,
   since it can be configured separately from the prefix (and in most
   packaged builds which set prefix=/usr, $(sysconfdir) is not
   $(prefix)/etc).

-Peff

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: curious about wording in "man git-config", ENVIRONMENT
  2018-06-26 12:43 ` Jeff King
@ 2018-06-26 16:51   ` Robert P. J. Day
  2018-06-28 18:17     ` Jeff King
  0 siblings, 1 reply; 4+ messages in thread
From: Robert P. J. Day @ 2018-06-26 16:51 UTC (permalink / raw)
  To: Jeff King; +Cc: Git Mailing list

On Tue, 26 Jun 2018, Jeff King wrote:

> On Tue, Jun 26, 2018 at 06:18:26AM -0400, Robert P. J. Day wrote:
>
> >
> >   ENVIRONMENT
> >     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.
> >
> >   is the phrase "forces this to" really what you want to use here?
> > maybe i misunderstand what this option does, doesn't it simply mean
> > that it will use a different (specified) file from the default,
> > depending on the context (local, global, system)?
> >
> >   it just seems weird to say that the option "forces" the use of what
> > are clearly the default files. thoughts?
>
> I agree it's weird. I think it's trying to mean "behaves as if it
> was set to", but with the additional notion that the command-line
> argument would take precedence over the environment (which is our
> usual rule). But then we should just say those things explicitly.
>
> Just looking at mentions of GIT_CONFIG in that manpage and knowing
> the history, I think:

  ... snip ...

i'm just going to admit that i don't quite have the background to know
how to submit a patch to tidy things up based on Jeff's analysis, so
I'm going to leave this to someone higher up the food chain.

rday

-- 

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

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: curious about wording in "man git-config", ENVIRONMENT
  2018-06-26 16:51   ` Robert P. J. Day
@ 2018-06-28 18:17     ` Jeff King
  0 siblings, 0 replies; 4+ messages in thread
From: Jeff King @ 2018-06-28 18:17 UTC (permalink / raw)
  To: Robert P. J. Day; +Cc: Git Mailing list

On Tue, Jun 26, 2018 at 12:51:45PM -0400, Robert P. J. Day wrote:

> > I agree it's weird. I think it's trying to mean "behaves as if it
> > was set to", but with the additional notion that the command-line
> > argument would take precedence over the environment (which is our
> > usual rule). But then we should just say those things explicitly.
> >
> > Just looking at mentions of GIT_CONFIG in that manpage and knowing
> > the history, I think:
> 
>   ... snip ...
> 
> i'm just going to admit that i don't quite have the background to know
> how to submit a patch to tidy things up based on Jeff's analysis, so
> I'm going to leave this to someone higher up the food chain.

There's some related discussion going on in:

  https://public-inbox.org/git/20180627045637.13818-1-tmz@pobox.com/

I think it makes sense to wait for that to settle and then I may try to
build on top.

-Peff

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-06-28 18:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-26 10:18 curious about wording in "man git-config", ENVIRONMENT Robert P. J. Day
2018-06-26 12:43 ` Jeff King
2018-06-26 16:51   ` Robert P. J. Day
2018-06-28 18:17     ` Jeff King

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.