git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* git-config(1) should mention `git -c`
@ 2016-08-22 18:42 David Glasser
  2016-08-22 18:57 ` Jeff King
  0 siblings, 1 reply; 5+ messages in thread
From: David Glasser @ 2016-08-22 18:42 UTC (permalink / raw)
  To: git

In addition to describing the `git config` command, git-config(1) also
appears to be where the algorithm for determining the active
configuration values is documented, in the FILES and ENVIRONMENT
sections.  (There is minimal documentation of these files and
environment variables in git(1).)

However, `git -c name=value` is not documented in this manpage. So to
understand the full set of ways to affect the configuration of a git
command, you need to know to read both git(1) and git-config(1).

I'd like to add a reference to `git -c` to git-config(1). I would
happily send a patch but I'm not sure of the best place to put it —
maybe in the FILES section?

--dave

-- 
glasser@davidglasser.net | langtonlabs.org | flickr.com/photos/glasser/

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

* Re: git-config(1) should mention `git -c`
  2016-08-22 18:42 git-config(1) should mention `git -c` David Glasser
@ 2016-08-22 18:57 ` Jeff King
  2016-08-23 17:16   ` Junio C Hamano
  0 siblings, 1 reply; 5+ messages in thread
From: Jeff King @ 2016-08-22 18:57 UTC (permalink / raw)
  To: David Glasser; +Cc: git

On Mon, Aug 22, 2016 at 11:42:52AM -0700, David Glasser wrote:

> In addition to describing the `git config` command, git-config(1) also
> appears to be where the algorithm for determining the active
> configuration values is documented, in the FILES and ENVIRONMENT
> sections.  (There is minimal documentation of these files and
> environment variables in git(1).)
> 
> However, `git -c name=value` is not documented in this manpage. So to
> understand the full set of ways to affect the configuration of a git
> command, you need to know to read both git(1) and git-config(1).

Yeah, I agree it is probably worth mentioning in git-config(1).

> I'd like to add a reference to `git -c` to git-config(1). I would
> happily send a patch but I'm not sure of the best place to put it —
> maybe in the FILES section?

That seems like the most sensible place, as that is where we should
cover the order of reading and precedence. Perhaps FILES should be
renamed to SOURCES or something (though I do not recall if we are
restricted to "usual" manpage section names or not).

Arguably this is not about git-config the program at all, but the
general concept of "configuration for git", because the precedence rules
apply equally to all of the git programs that read config. So it _could_
be pulled out into its own gitconfig(7) page. That's a lot more work,
though, and I don't blame you if you want to start with a more minor
update.

(I also think that having both git-config(1) and gitconfig(7) may be
confusing; "git help revisions" knows to find gitrevisions(7), but "git
help config" would always end up in git-config(1), I think).

-Peff

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

* Re: git-config(1) should mention `git -c`
  2016-08-22 18:57 ` Jeff King
@ 2016-08-23 17:16   ` Junio C Hamano
  2016-08-23 17:33     ` David Glasser
  2016-08-23 21:41     ` Jeff King
  0 siblings, 2 replies; 5+ messages in thread
From: Junio C Hamano @ 2016-08-23 17:16 UTC (permalink / raw)
  To: Jeff King; +Cc: David Glasser, git

Jeff King <peff@peff.net> writes:

> That seems like the most sensible place, as that is where we should
> cover the order of reading and precedence. Perhaps FILES should be
> renamed to SOURCES or something (though I do not recall if we are
> restricted to "usual" manpage section names or not).
>
> Arguably this is not about git-config the program at all, but the
> general concept of "configuration for git", because the precedence rules
> apply equally to all of the git programs that read config.

True, but that argument leads us to say git(1) is the best place ;-)

If the user wants to know "how does the configuration values get
read?", and wishes not having to go around fishing for the
information in multiple places (and I think that is a reasonable
thing to wish for), I think adding it to the FILES section of
git-config(1) is a better option than inventing a separate
gitconfig(7), which would still require the user to consult two
places.


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

* Re: git-config(1) should mention `git -c`
  2016-08-23 17:16   ` Junio C Hamano
@ 2016-08-23 17:33     ` David Glasser
  2016-08-23 21:41     ` Jeff King
  1 sibling, 0 replies; 5+ messages in thread
From: David Glasser @ 2016-08-23 17:33 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Jeff King, git

On Tue, Aug 23, 2016 at 10:16 AM, Junio C Hamano <gitster@pobox.com> wrote:
> Jeff King <peff@peff.net> writes:
>
>> That seems like the most sensible place, as that is where we should
>> cover the order of reading and precedence. Perhaps FILES should be
>> renamed to SOURCES or something (though I do not recall if we are
>> restricted to "usual" manpage section names or not).
>>
>> Arguably this is not about git-config the program at all, but the
>> general concept of "configuration for git", because the precedence rules
>> apply equally to all of the git programs that read config.
>
> True, but that argument leads us to say git(1) is the best place ;-)
>
> If the user wants to know "how does the configuration values get
> read?", and wishes not having to go around fishing for the
> information in multiple places (and I think that is a reasonable
> thing to wish for), I think adding it to the FILES section of
> git-config(1) is a better option than inventing a separate
> gitconfig(7), which would still require the user to consult two
> places.

Great, I sent a patch in a new thread. I hope I formatted it
correctly; haven't sent a patch via email in a while.



-- 
glasser@davidglasser.net | langtonlabs.org | flickr.com/photos/glasser/

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

* Re: git-config(1) should mention `git -c`
  2016-08-23 17:16   ` Junio C Hamano
  2016-08-23 17:33     ` David Glasser
@ 2016-08-23 21:41     ` Jeff King
  1 sibling, 0 replies; 5+ messages in thread
From: Jeff King @ 2016-08-23 21:41 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: David Glasser, git

On Tue, Aug 23, 2016 at 10:16:18AM -0700, Junio C Hamano wrote:

> Jeff King <peff@peff.net> writes:
> 
> > That seems like the most sensible place, as that is where we should
> > cover the order of reading and precedence. Perhaps FILES should be
> > renamed to SOURCES or something (though I do not recall if we are
> > restricted to "usual" manpage section names or not).
> >
> > Arguably this is not about git-config the program at all, but the
> > general concept of "configuration for git", because the precedence rules
> > apply equally to all of the git programs that read config.
> 
> True, but that argument leads us to say git(1) is the best place ;-)

Sort of. I agree it is a good place to mention the precedence, but...

> If the user wants to know "how does the configuration values get
> read?", and wishes not having to go around fishing for the
> information in multiple places (and I think that is a reasonable
> thing to wish for), I think adding it to the FILES section of
> git-config(1) is a better option than inventing a separate
> gitconfig(7), which would still require the user to consult two
> places.

The flip side of "fishing for the information in multiple places" is "I
know it is somewhere in git-config(1), but I have to wade through a
bunch of cruft about git-config command-line options to find it".

So I'd argue that the concept of config (overview, precedence, file
syntax, list of options) could be separate from both git-config(1) and
from git(1), and that both of those places could point to it. That
introduces a level of indirection which is annoying the first time ("I
am reading git-config(1), but now I have to jump to another manpage")
but helpful the other times ("I know I want config concepts, not the
config tool; I can immediately jump to the right place").

Anyway. Just my two cents on the matter. I think we can improve David's
complaint without anything so drastic.

-Peff

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

end of thread, other threads:[~2016-08-23 21:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-22 18:42 git-config(1) should mention `git -c` David Glasser
2016-08-22 18:57 ` Jeff King
2016-08-23 17:16   ` Junio C Hamano
2016-08-23 17:33     ` David Glasser
2016-08-23 21:41     ` Jeff King

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).