threads / patch / 21196

patch, 2 partsuser-manual: reorganize the configuration steps

Subject: [PATCH 0/2] user-manual: reorganize the configuration steps

## tl;dr

13 messages between Oct 11, 2009 and Oct 14, 2009. Diffs are folded; open one to read it.

replies: 12people: 5as markdown or json

Felipe Contreras· Oct 11, 2009, 20:43 UTC · lore

This basically introduces the "getting started" section so users get familiar with the configuration from the get-go, and also, most people prefer to teach 'git config --global' to setup the user name and email. Here are a few examples:

git tutorial: http://www.kernel.org/pub/software/scm/git/docs/gittutorial.html

GNOME: http://live.gnome.org/Git/Developers

SourceForge: http://sourceforge.net/apps/trac/sourceforge/wiki/Git

github: http://help.github.com/git-email-settings/

Felipe Contreras (2):
  user-manual: add global config section
  user-manual: simplify the user configuration
 Documentation/user-manual.txt |   35 ++++++++++++++++++++++++++++++-----
 1 files changed, 30 insertions(+), 5 deletions(-)
Felipe Contreras· Oct 11, 2009, 20:43 UTC · re: Felipe Contreras · lore

[PATCH 1/2] user-manual: add global config section

So that users get to know how to configure git from the get-to with good practical example (color.ui = auto) that most people would probably like anyway.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 Documentation/user-manual.txt |   27 +++++++++++++++++++++++++++
 1 files changed, 27 insertions(+), 0 deletions(-)
Show changes to Documentation/user-manual.txt +27 −0
diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
index 67ebffa..ff2563a 100644
--- a/Documentation/user-manual.txt
+++ b/Documentation/user-manual.txt
@@ -40,6 +40,33 @@ without any explanation.
 Finally, see <<todo>> for ways that you can help make this manual more
 complete.
 
+[[getting-started]]
+Getting started
+=============
+
+Git's configuration is distributed among different locations--this manual will
+only to deal with 'global' (for the user) and 'repository' variables, where
+'repository' variables take precedence over 'global' ones.
+
+You would probably want to start setting up something useful:
+------------------------------------------------
+$ git config --global color.ui auto
+------------------------------------------------
+
+This will make prettier the output of certain commands such as `git diff`, but
+that's not important; what is important here is that `color.ui` has been
+stored in the 'global' configuration.
+
+View and manually modify the configuration by opening `~/.gitconfig`:
+------------------------------------------------
+[color]
+        ui = auto
+------------------------------------------------
+
+Other locations are `/etc/gitconfig` (system), and `.git/config` (repository).
+
+More git configurations will be covered in the rest of the manual, if you want
+to learn more look at linkgit:git-config[1] for details.
 
 [[repositories-and-branches]]
 Repositories and Branches
-- 
1.6.5.4.g31fc3
Felipe Contreras· Oct 11, 2009, 20:43 UTC · re: Felipe Contreras · lore

[PATCH 2/2] user-manual: simplify the user configuration

This is shorter, avoids the burder to think about the format of the configuration file, and most guides out there prefer this form.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 Documentation/user-manual.txt |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)
Show changes to Documentation/user-manual.txt +3 −5
diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
index ff2563a..bab64f8 100644
--- a/Documentation/user-manual.txt
+++ b/Documentation/user-manual.txt
@@ -1008,13 +1008,11 @@ Telling git your name
 ---------------------
 
 Before creating any commits, you should introduce yourself to git.  The
-easiest way to do so is to make sure the following lines appear in a
-file named .gitconfig in your home directory:
+easiest way is to use the linkgit:git-config[1] command:
 
 ------------------------------------------------
-[user]
-	name = Your Name Comes Here
-	email = you@yourdomain.example.com
+$ git config --global user.name "Your Name Comes Here"
+$ git config --global user.email you@yourdomain.example.com
 ------------------------------------------------
 
 (See the "CONFIGURATION FILE" section of linkgit:git-config[1] for
-- 
1.6.5.4.g31fc3
Jonathan Nieder· Oct 11, 2009, 22:27 UTC · re: Felipe Contreras · lore

Re: [PATCH 1/2] user-manual: add global config section

Felipe Contreras wrote:
Show 5 quoted lines
> So that users get to know how to configure git from the get-to with good
> practical example (color.ui = auto) that most people would probably like
> anyway.
> 
> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Good idea.  Some comments:
> +Git's configuration is distributed among different locations--this manual will
> +only to deal with 'global' (for the user) and 'repository' variables, where
> +'repository' variables take precedence over 'global' ones.

What are these different locations you speak of? If git’s configuration is complicated to deal with, maybe that is something that could be improved.

This is very early in the manual, where every word counts. I am not very good at wording and do not have any better suggestions, but would it be possible to more efficiently convey this:

	Git reads its per-user configuration from ~/.gitignore.
	That file can also be manipulated with the "git config"
	command, which can be convenient in scripts or when using
	operating systems like Windows where it is not clear where
	the home directory is.
	For example, if your terminal supports it, you can tell Git
	to use color in the output for commands such as "git diff"
	with "git config --global color.ui auto".
	For more information and a list of possible settings, see
	git-config(1).

By the way, this reminds me that I am not sure git-config(1) conveys the list of configuration items in an ideal way. It can be easy to dismiss that page as plumbing documentation when seeing it for the first time. Should we ship a sample .gitconfig with all items included and comments describing them, or a separate gitconfig(5)? Either would be easy to generate from config.txt.

Thoughts? Jonathan

Junio C Hamano· Oct 12, 2009, 21:06 UTC · re: Jonathan Nieder · lore

Re: [PATCH 1/2] user-manual: add global config section

Jonathan Nieder <jrnieder@gmail.com> writes:
Show 17 quoted lines
> This is very early in the manual, where every word counts.  I am not
> very good at wording and do not have any better suggestions, but would
> it be possible to more efficiently convey this:
>
> 	Git reads its per-user configuration from ~/.gitignore.
>
> 	That file can also be manipulated with the "git config"
> 	command, which can be convenient in scripts or when using
> 	operating systems like Windows where it is not clear where
> 	the home directory is.
>
> 	For example, if your terminal supports it, you can tell Git
> 	to use color in the output for commands such as "git diff"
> 	with "git config --global color.ui auto".
>
> 	For more information and a list of possible settings, see
> 	git-config(1).

The way how the above introduces the "git config" command to people who see git for the first time makes sense. Unfortunately, --global and per-user do not "click" together when given in isolation, and I think it would help if it is explained this way, using a setting that can validly be either per-user or project specific:

    Various configuration variables affect how git operates.  Some are
    specific to the user (e.g. if you prefer to see the output in colour),
    while some are specific to a repository (e.g. what other repositories
    it interacts with).  Git reads from ~/.gitconfig file to learn your
    personal settings and .git/config file of the repository you are
    working in to learn the repository settings.
    These are plain text files that you can view or edit in your text
    editor, but they also can be manipulated with the "git config"
    command, which is convenient in scripts or ...
    For example, if you want to use a particular e-mail address only while
    working in the current repository, you would set "user.email" variable
    to that e-mail address in the repository configuration file (i.e.
    .git/config) with this command:
	git config user.email your@email.address.xz
    If on the other hand you want to use the same address for any project
    you work with, you can instead set this in your personal configuration
    file (i.e.  ~/.gitconfig) with this command:
	git config --global user.email your@email.address.xz
    For more information ...

Since this is an end-user material, I deliberately omitted talking about the --system (i.e. /etc/gitconfig) in the above.

Michael J Gruber· Oct 12, 2009, 12:25 UTC · re: Felipe Contreras · lore

Re: [PATCH 1/2] user-manual: add global config section

Felipe Contreras venit, vidit, dixit 11.10.2009 22:43:
Show 24 quoted lines
> So that users get to know how to configure git from the get-to with good
> practical example (color.ui = auto) that most people would probably like
> anyway.
> 
> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
> ---
>  Documentation/user-manual.txt |   27 +++++++++++++++++++++++++++
>  1 files changed, 27 insertions(+), 0 deletions(-)
> 
> diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
> index 67ebffa..ff2563a 100644
> --- a/Documentation/user-manual.txt
> +++ b/Documentation/user-manual.txt
> @@ -40,6 +40,33 @@ without any explanation.
>  Finally, see <<todo>> for ways that you can help make this manual more
>  complete.
>  
> +[[getting-started]]
> +Getting started
> +=============
> +
> +Git's configuration is distributed among different locations--this manual will
> +only to deal with 'global' (for the user) and 'repository' variables, where
> +'repository' variables take precedence over 'global' ones.

Well, you do talk about "system" below, and that's about it. Also, the configuration is not really distributed among different locations. Most newbies interested in a *D*VCS will misunderstand this (as git having distributed configuration).

Alternative:

Git's default configuration can be changed on a system wide, global (per user) and local (per repository) level, in the order of increasing precedence.

Show 9 quoted lines
> +
> +You would probably want to start setting up something useful:
> +------------------------------------------------
> +$ git config --global color.ui auto
> +------------------------------------------------
> +
> +This will make prettier the output of certain commands such as `git diff`, but
> +that's not important; what is important here is that `color.ui` has been
> +stored in the 'global' configuration.

This will make certain commands such as `git diff` use colors in the output. What is important here is that the value `auto` for the option `color.ui` has been stored in the 'global' configuration. Use `--system` for the system wide configuration; specifying neither `--system` nor `--global` makes `git config` access the local configuration.

> +
> +View and manually modify the configuration by opening `~/.gitconfig`:

View and manually modify the global configuration by opening `~/.gitconfig` in your editor or using `git config --global --edit`:

Show 6 quoted lines
> +------------------------------------------------
> +[color]
> +        ui = auto
> +------------------------------------------------
> +
> +Other locations are `/etc/gitconfig` (system), and `.git/config` (repository).

I don't even think we should talk about locations here, "git config -e" should be the first user's way to do it.

> +
> +More git configurations will be covered in the rest of the manual, if you want
> +to learn more look at linkgit:git-config[1] for details.

"Configurations" is ambiguous, it can be easily (mis)understood as "types of configuration" (global, local etc.). Also, the above doesn't really cover even one option. How about:

This manual covers many configuration options (such as `color.ui.`). For more details on the `git config` command as well as all configuration options see linkgit:git-config[1].

>  [[repositories-and-branches]]
>  Repositories and Branches

Cheers, Michael

Felipe Contreras· Oct 12, 2009, 17:09 UTC · re: Michael J Gruber · lore

Re: [PATCH 1/2] user-manual: add global config section

On Mon, Oct 12, 2009 at 3:25 PM, Michael J Gruber <git@drmicha.warpmail.net> wrote:

Show 36 quoted lines
> Felipe Contreras venit, vidit, dixit 11.10.2009 22:43:
>> So that users get to know how to configure git from the get-to with good
>> practical example (color.ui = auto) that most people would probably like
>> anyway.
>>
>> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
>> ---
>>  Documentation/user-manual.txt |   27 +++++++++++++++++++++++++++
>>  1 files changed, 27 insertions(+), 0 deletions(-)
>>
>> diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
>> index 67ebffa..ff2563a 100644
>> --- a/Documentation/user-manual.txt
>> +++ b/Documentation/user-manual.txt
>> @@ -40,6 +40,33 @@ without any explanation.
>>  Finally, see <<todo>> for ways that you can help make this manual more
>>  complete.
>>
>> +[[getting-started]]
>> +Getting started
>> +=============
>> +
>> +Git's configuration is distributed among different locations--this manual will
>> +only to deal with 'global' (for the user) and 'repository' variables, where
>> +'repository' variables take precedence over 'global' ones.
>
> Well, you do talk about "system" below, and that's about it. Also, the
> configuration is not really distributed among different locations. Most
> newbies interested in a *D*VCS will misunderstand this (as git having
> distributed configuration).
>
> Alternative:
>
> Git's default configuration can be changed on a system wide, global (per
> user) and local (per repository) level, in the order of increasing
> precedence.

When I read that it's not clear if the local level discards the global level completely or it's aggregated. If we specify that it's only the variables that take precedence it might be clearer:

Git's configuration is composed of variables that are stored in multiple locations: 'system' (all users), 'global' (for the user), and 'repository' -- in decreasing order of precedence.

Show 15 quoted lines
>> +
>> +You would probably want to start setting up something useful:
>> +------------------------------------------------
>> +$ git config --global color.ui auto
>> +------------------------------------------------
>> +
>> +This will make prettier the output of certain commands such as `git diff`, but
>> +that's not important; what is important here is that `color.ui` has been
>> +stored in the 'global' configuration.
>
> This will make certain commands such as `git diff` use colors in the
> output. What is important here is that the value `auto` for the option
> `color.ui` has been stored in the 'global' configuration. Use `--system`
> for the system wide configuration; specifying neither `--system` nor
> `--global` makes `git config` access the local configuration.

I think we should only mention (once) the system wide configuration, but not cover it. That's for system administrators, not users.

Show 5 quoted lines
>> +
>> +View and manually modify the configuration by opening `~/.gitconfig`:
>
> View and manually modify the global configuration by opening
> `~/.gitconfig` in your editor or using `git config --global --edit`:

I have separate patches for 'git config --edit', but Junio suggested to hold them back because --edit is a relatively new option.

Show 9 quoted lines
>> +------------------------------------------------
>> +[color]
>> +        ui = auto
>> +------------------------------------------------
>> +
>> +Other locations are `/etc/gitconfig` (system), and `.git/config` (repository).
>
> I don't even think we should talk about locations here, "git config -e"
> should be the first user's way to do it.

I disagree. Most useful configurations (color.ui, user.email) should be global. The complete newbie might think: cool, now I have my git properly configured (with 'git config -e'), and then when cloning a new repo (s)he would think: ok, git just forgot what I told him. When that happens (s)he would have to re-learn and re-configure git.

When users think about configuration, it's usually a 'global' configuration, so that's what we should teach from the beginning and make sure they understand the difference between 'global' and 'repository' configurations.

Show 11 quoted lines
>> +
>> +More git configurations will be covered in the rest of the manual, if you want
>> +to learn more look at linkgit:git-config[1] for details.
>
> "Configurations" is ambiguous, it can be easily (mis)understood as
> "types of configuration" (global, local etc.). Also, the above doesn't
> really cover even one option. How about:
>
> This manual covers many configuration options (such as `color.ui.`). For
> more details on the `git config` command as well as all configuration
> options see linkgit:git-config[1].
Looks better, except s/configuration options/configuration variables/
Cheers.
-- 
Felipe Contreras
Michael J Gruber· Oct 13, 2009, 07:19 UTC · re: Felipe Contreras · lore

Re: [PATCH 1/2] user-manual: add global config section

Felipe Contreras venit, vidit, dixit 12.10.2009 19:09:
Show 46 quoted lines
> On Mon, Oct 12, 2009 at 3:25 PM, Michael J Gruber
> <git@drmicha.warpmail.net> wrote:
>> Felipe Contreras venit, vidit, dixit 11.10.2009 22:43:
>>> So that users get to know how to configure git from the get-to with good
>>> practical example (color.ui = auto) that most people would probably like
>>> anyway.
>>>
>>> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
>>> ---
>>>  Documentation/user-manual.txt |   27 +++++++++++++++++++++++++++
>>>  1 files changed, 27 insertions(+), 0 deletions(-)
>>>
>>> diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
>>> index 67ebffa..ff2563a 100644
>>> --- a/Documentation/user-manual.txt
>>> +++ b/Documentation/user-manual.txt
>>> @@ -40,6 +40,33 @@ without any explanation.
>>>  Finally, see <<todo>> for ways that you can help make this manual more
>>>  complete.
>>>
>>> +[[getting-started]]
>>> +Getting started
>>> +=============
>>> +
>>> +Git's configuration is distributed among different locations--this manual will
>>> +only to deal with 'global' (for the user) and 'repository' variables, where
>>> +'repository' variables take precedence over 'global' ones.
>>
>> Well, you do talk about "system" below, and that's about it. Also, the
>> configuration is not really distributed among different locations. Most
>> newbies interested in a *D*VCS will misunderstand this (as git having
>> distributed configuration).
>>
>> Alternative:
>>
>> Git's default configuration can be changed on a system wide, global (per
>> user) and local (per repository) level, in the order of increasing
>> precedence.
> 
> When I read that it's not clear if the local level discards the global
> level completely or it's aggregated. If we specify that it's only the
> variables that take precedence it might be clearer:
> 
> Git's configuration is composed of variables that are stored in
> multiple locations: 'system' (all users), 'global' (for the user), and
> 'repository' -- in decreasing order of precedence.

Yep, although established lingo is "options" (not "variables"), and it's really increasing order, not decreasing.

Show 49 quoted lines
> 
>>> +
>>> +You would probably want to start setting up something useful:
>>> +------------------------------------------------
>>> +$ git config --global color.ui auto
>>> +------------------------------------------------
>>> +
>>> +This will make prettier the output of certain commands such as `git diff`, but
>>> +that's not important; what is important here is that `color.ui` has been
>>> +stored in the 'global' configuration.
>>
>> This will make certain commands such as `git diff` use colors in the
>> output. What is important here is that the value `auto` for the option
>> `color.ui` has been stored in the 'global' configuration. Use `--system`
>> for the system wide configuration; specifying neither `--system` nor
>> `--global` makes `git config` access the local configuration.
> 
> I think we should only mention (once) the system wide configuration,
> but not cover it. That's for system administrators, not users.
> 
>>> +
>>> +View and manually modify the configuration by opening `~/.gitconfig`:
>>
>> View and manually modify the global configuration by opening
>> `~/.gitconfig` in your editor or using `git config --global --edit`:
> 
> I have separate patches for 'git config --edit', but Junio suggested
> to hold them back because --edit is a relatively new option.
> 
>>> +------------------------------------------------
>>> +[color]
>>> +        ui = auto
>>> +------------------------------------------------
>>> +
>>> +Other locations are `/etc/gitconfig` (system), and `.git/config` (repository).
>>
>> I don't even think we should talk about locations here, "git config -e"
>> should be the first user's way to do it.
> 
> I disagree. Most useful configurations (color.ui, user.email) should
> be global. The complete newbie might think: cool, now I have my git
> properly configured (with 'git config -e'), and then when cloning a
> new repo (s)he would think: ok, git just forgot what I told him. When
> that happens (s)he would have to re-learn and re-configure git.
> 
> When users think about configuration, it's usually a 'global'
> configuration, so that's what we should teach from the beginning and
> make sure they understand the difference between 'global' and
> 'repository' configurations.

Sure. What I meant are the file locations, the actual paths. First timers should use "git config -e" and "git config --global -e" if they really want to edit their local and global config files. Better yet, they should use "git config" and "git config --global" in their set and get modes, because they make sure that there's no total garbage in the config. The locations of the files are an implementation detail.

Show 15 quoted lines
> 
>>> +
>>> +More git configurations will be covered in the rest of the manual, if you want
>>> +to learn more look at linkgit:git-config[1] for details.
>>
>> "Configurations" is ambiguous, it can be easily (mis)understood as
>> "types of configuration" (global, local etc.). Also, the above doesn't
>> really cover even one option. How about:
>>
>> This manual covers many configuration options (such as `color.ui.`). For
>> more details on the `git config` command as well as all configuration
>> options see linkgit:git-config[1].
> 
> Looks better, except s/configuration options/configuration variables/
> 

Uhm, no, for the reason mentioned above. While the man page of git config is not completely consistent either, we're really talking about configuration options. An "option" can be set to a "value", and the thing you pass in order to do that can be called a "variable". For the most part this is how git-config[1] uses this terminology.

Michael
Felipe Contreras· Oct 14, 2009, 14:26 UTC · re: Michael J Gruber · lore

Re: [PATCH 1/2] user-manual: add global config section

On Tue, Oct 13, 2009 at 10:19 AM, Michael J Gruber <git@drmicha.warpmail.net> wrote:

Show 24 quoted lines
> Felipe Contreras venit, vidit, dixit 12.10.2009 19:09:
>> On Mon, Oct 12, 2009 at 3:25 PM, Michael J Gruber
>> <git@drmicha.warpmail.net> wrote:
>>> Well, you do talk about "system" below, and that's about it. Also, the
>>> configuration is not really distributed among different locations. Most
>>> newbies interested in a *D*VCS will misunderstand this (as git having
>>> distributed configuration).
>>>
>>> Alternative:
>>>
>>> Git's default configuration can be changed on a system wide, global (per
>>> user) and local (per repository) level, in the order of increasing
>>> precedence.
>>
>> When I read that it's not clear if the local level discards the global
>> level completely or it's aggregated. If we specify that it's only the
>> variables that take precedence it might be clearer:
>>
>> Git's configuration is composed of variables that are stored in
>> multiple locations: 'system' (all users), 'global' (for the user), and
>> 'repository' -- in decreasing order of precedence.
>
> Yep, although established lingo is "options" (not "variables"), and it's
> really increasing order, not decreasing.

Really? I remember clearly Junio stating otherwise: http://marc.info/?l=git&m=123460371724873&w=2

----
> +	OPT_BOOLEAN(0, "unset", &do_unset, "removes an option: name [value-regex]"),

Please don't introduce a new noun "option" that has never been used to mean a "configuration variable" in git documentation. It unnecessarily confuses everybody. ----

Show 17 quoted lines
>> I disagree. Most useful configurations (color.ui, user.email) should
>> be global. The complete newbie might think: cool, now I have my git
>> properly configured (with 'git config -e'), and then when cloning a
>> new repo (s)he would think: ok, git just forgot what I told him. When
>> that happens (s)he would have to re-learn and re-configure git.
>>
>> When users think about configuration, it's usually a 'global'
>> configuration, so that's what we should teach from the beginning and
>> make sure they understand the difference between 'global' and
>> 'repository' configurations.
>
> Sure. What I meant are the file locations, the actual paths. First
> timers should use "git config -e" and "git config --global -e" if they
> really want to edit their local and global config files. Better yet,
> they should use "git config" and "git config --global" in their set and
> get modes, because they make sure that there's no total garbage in the
> config. The locations of the files are an implementation detail.
Oh, in that case I agree.
Show 8 quoted lines
>> Looks better, except s/configuration options/configuration variables/
>>
>
> Uhm, no, for the reason mentioned above. While the man page of git
> config is not completely consistent either, we're really talking about
> configuration options. An "option" can be set to a "value", and the
> thing you pass in order to do that can be called a "variable". For the
> most part this is how git-config[1] uses this terminology.

Yeah, but not everything in there is an option. Personally I would prefer the "option" term, but as I said, Junio disagreed some time ago.

-- 
Felipe Contreras
Michael J Gruber· Oct 14, 2009, 16:09 UTC · re: Felipe Contreras · lore

Re: [PATCH 1/2] user-manual: add global config section

Felipe Contreras venit, vidit, dixit 14.10.2009 16:26:
Show 37 quoted lines
> On Tue, Oct 13, 2009 at 10:19 AM, Michael J Gruber
> <git@drmicha.warpmail.net> wrote:
>> Felipe Contreras venit, vidit, dixit 12.10.2009 19:09:
>>> On Mon, Oct 12, 2009 at 3:25 PM, Michael J Gruber
>>> <git@drmicha.warpmail.net> wrote:
>>>> Well, you do talk about "system" below, and that's about it. Also, the
>>>> configuration is not really distributed among different locations. Most
>>>> newbies interested in a *D*VCS will misunderstand this (as git having
>>>> distributed configuration).
>>>>
>>>> Alternative:
>>>>
>>>> Git's default configuration can be changed on a system wide, global (per
>>>> user) and local (per repository) level, in the order of increasing
>>>> precedence.
>>>
>>> When I read that it's not clear if the local level discards the global
>>> level completely or it's aggregated. If we specify that it's only the
>>> variables that take precedence it might be clearer:
>>>
>>> Git's configuration is composed of variables that are stored in
>>> multiple locations: 'system' (all users), 'global' (for the user), and
>>> 'repository' -- in decreasing order of precedence.
>>
>> Yep, although established lingo is "options" (not "variables"), and it's
>> really increasing order, not decreasing.
> 
> Really? I remember clearly Junio stating otherwise:
> http://marc.info/?l=git&m=123460371724873&w=2
> 
> ----
>> +	OPT_BOOLEAN(0, "unset", &do_unset, "removes an option: name [value-regex]"),
> 
> Please don't introduce a new noun "option" that has never been used to
> mean a "configuration variable" in git documentation.  It unnecessarily
> confuses everybody.
> ----

Well, Junio certainly is authoritative, and I don't want to risk any bad patch-acceptance-fu ( :) ), but

2d2465c (Add documentation for git-config-set, 2005-11-17)

is the origin of that doc for git-config. I'm not just claiming it myself. That commit introduced "option", uses it in all but one place, and this never changed since then! [The ratio went up from 6:1 to 40:5] I have no objection to changing this established notion, but established it is. I haven't tracked down the use of option vs. variable in other places than git-config.txt and its predecessors.

Michael
Junio C Hamano· Oct 14, 2009, 19:10 UTC · re: Michael J Gruber · lore

Re: [PATCH 1/2] user-manual: add global config section

Michael J Gruber <git@drmicha.warpmail.net> writes:
> Well, Junio certainly is authoritative, and I don't want to risk any bad

Even though I usually call them "configuration variables", I do not consider myself authoritative in this particular issue, as I did not care about the wording myself that much. It is not like we have two (or three) distinct concepts that the user need to be aware of among configuration variable/option(/setting). In other words, I never thought consistently sticking to one variant matters that much for this particular case, and I've used the word very casually and interchangeably, but except in one specific context---see below.

I am open to be corrected by Documentation/glossary.txt and other sources.
Show 8 quoted lines
> 2d2465c (Add documentation for git-config-set, 2005-11-17)
>
> is the origin of that doc for git-config. I'm not just claiming it
> myself. That commit introduced "option", uses it in all but one place,
> and this never changed since then! [The ratio went up from 6:1 to 40:5]
> I have no objection to changing this established notion, but established
> it is. I haven't tracked down the use of option vs. variable in other
> places than git-config.txt and its predecessors.

I am Ok with calling them "configuration options", and I am also Ok with calling them just "options" when it is clear from the context that we are talking about configuration file.

The _only_ thing I deliberately do is to avoid calling them configuration "options" when discussing "command line options override what you have in the configuration file", but even there I would use "settings" and "variables" interchangeably. E.g. both of these are fine with me:

    The settings in your .git/config file will give the default when there
    is no command line option given.
vs
    The variables in your .git/config file will give the default when
    there is no command line option given.

but personally I think it would make it less easier to follow if you changed these "settings/variables" to "options".

J. Bruce Fields· Oct 14, 2009, 02:49 UTC · re: Felipe Contreras · lore

Re: [PATCH 0/2] user-manual: reorganize the configuration steps

On Sun, Oct 11, 2009 at 11:43:04PM +0300, Felipe Contreras wrote:
> This basically introduces the "getting started" section so users get familiar
> with the configuration from the get-go, and also, most people prefer to teach
> 'git config --global' to setup the user name and email. Here are a few
> examples:

I'm not personally a big fan of starting out with a "how to use git-config" section, because it's not that difficult or important: questions we get on this list suggest confusion about a lot of things, but git configuration is rarely one of them (that I've noticed).

I'd rather just point people to the git-config man page the first time we mention any git configuration. (And improve the man page if necessary to ensure it's up to the job.)

If we have to do this, just keep it short....
--b.
Show 20 quoted lines
> 
> git tutorial:
> http://www.kernel.org/pub/software/scm/git/docs/gittutorial.html
> 
> GNOME:
> http://live.gnome.org/Git/Developers
> 
> SourceForge:
> http://sourceforge.net/apps/trac/sourceforge/wiki/Git
> 
> github:
> http://help.github.com/git-email-settings/
> 
> Felipe Contreras (2):
>   user-manual: add global config section
>   user-manual: simplify the user configuration
> 
>  Documentation/user-manual.txt |   35 ++++++++++++++++++++++++++++++-----
>  1 files changed, 30 insertions(+), 5 deletions(-)
> 
Felipe Contreras· Oct 14, 2009, 14:14 UTC · re: J. Bruce Fields · lore

Re: [PATCH 0/2] user-manual: reorganize the configuration steps

On Wed, Oct 14, 2009 at 5:49 AM, J. Bruce Fields <bfields@citi.umich.edu> wrote:
Show 10 quoted lines
> On Sun, Oct 11, 2009 at 11:43:04PM +0300, Felipe Contreras wrote:
>> This basically introduces the "getting started" section so users get familiar
>> with the configuration from the get-go, and also, most people prefer to teach
>> 'git config --global' to setup the user name and email. Here are a few
>> examples:
>
> I'm not personally a big fan of starting out with a "how to use
> git-config" section, because it's not that difficult or important:
> questions we get on this list suggest confusion about a lot of things,
> but git configuration is rarely one of them (that I've noticed).

Which means either people understand the configuration perfectly, look somewhere else for that, or they don't do it at all.

Judging by the fact that most guides cover it at the beginning, and people still send commits without proper user{.name,.email}, I would say it is needed.

Show 5 quoted lines
> I'd rather just point people to the git-config man page the first time
> we mention any git configuration.  (And improve the man page if
> necessary to ensure it's up to the job.)
>
> If we have to do this, just keep it short....
That's what I tried to do.
-- 
Felipe Contreras

← back to recent threads