threads / patch / 52668

v4, 6 partsDocumentation for common user misconceptions

Subject: [PATCH v4 0/6] Documentation for common user misconceptions

## tl;dr

13 messages between Jan 20, 2020 and Jan 21, 2020. Diffs are folded; open one to read it.

replies: 12people: 3as markdown or json

brian m. carlson· Jan 20, 2020, 17:33 UTC · lore

This is v4 of a series improving the documentation to cover common user misconceptions.

I did opt to keep the big commit information section because I think it provides value when documenting the ordering of the variables. Otherwise, it becomes confusing to advanced users which options control what and in what order.

Changes from v3:
* Restructure docs around git-commit(1).
* Improve wording about templating as suggested by Peff.
* Document ordering between user.*, author.*, and committer.*.
* Document the environment variables more thoroughly.
Changes from v2:
* Move author and committer information to git-commit(1) where people
  will look for it.
* Move guidance on user.name format to git-commit(1) as well and mention
  a shortened form of the advice in the `user.name` description.
* Use a parenthetical to describe a "personal name" without contrasting
  it with a username.
* Offer a potential solution for people who want to ignore tracked
  files by recommending a templating mechanism.
* Be slightly more verbose about why memory is wasted with
  http.postBuffer.
Changes from v1:
* Remove parenthetical which was confusing.
* Add two more patches.
brian m. carlson (5):
  doc: move author and committer information to git-commit(1)
  docs: expand on possible and recommended user config options
  doc: provide guidance on user.name format
  doc: dissuade users from trying to ignore tracked files
  docs: mention when increasing http.postBuffer is valuable
 Documentation/config/http.txt      |  8 ++++++
 Documentation/config/user.txt      |  7 +++++-
 Documentation/git-commit-tree.txt  | 26 ++++---------------
 Documentation/git-commit.txt       | 40 +++++++++++++++++++++++++++---
 Documentation/git-update-index.txt | 16 ++++++++++++
 Documentation/git.txt              | 27 ++++++++++++++++++--
 6 files changed, 97 insertions(+), 27 deletions(-)
brian m. carlson· Jan 20, 2020, 17:33 UTC · re: brian m. carlson · lore

[PATCH v4 2/5] docs: expand on possible and recommended user config options

In the section on setting author and committer information, we omit the author.* and committer.* variables, so mention them for completeness. In addition, guide users to the typical case: simply setting user.name and user.email, which are recommended if one does not need complex configuration.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
---
 Documentation/git-commit.txt | 7 +++++++
 1 file changed, 7 insertions(+)
Show changes to Documentation/git-commit.txt +7 −0
diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt
index 30c30ccd80..7b61c9ba79 100644
--- a/Documentation/git-commit.txt
+++ b/Documentation/git-commit.txt
@@ -482,6 +482,13 @@ system user name and the hostname used for outgoing mail (taken
 from `/etc/mailname` and falling back to the fully qualified hostname when
 that file does not exist).
 
+The `author.name` and `committer.name` and their corresponding email options
+override `user.name` and `user.email` if set and are overridden themselves by
+the environment variables.
+
+The typical usage is to set just the `user.name` and `user.email` variables;
+the other options are provided for more complex use cases.
+
 :git-commit: 1
 include::date-formats.txt[]
 
brian m. carlson· Jan 20, 2020, 17:33 UTC · re: brian m. carlson · lore

[PATCH v4 4/5] doc: dissuade users from trying to ignore tracked files

It is quite common for users to want to ignore the changes to a file that Git tracks. Common scenarios for this case are IDE settings and configuration files, which should generally not be tracked and possibly generated from tracked files using a templating mechanism.

However, users learn about the assume-unchanged and skip-worktree bits and try to use them to do this anyway. This is problematic, because when these bits are set, many operations behave as the user expects, but they usually do not help when git checkout needs to replace a file.

There is no sensible behavior in this case, because sometimes the data is precious, such as certain configuration files, and sometimes it is irrelevant data that the user would be happy to discard.

Since this is not a supported configuration and users are prone to misuse the existing features for unintended purposes, causing general sadness and confusion, let's document the existing behavior and the pitfalls in the documentation for git update-index so that users know they should explore alternate solutions.

In addition, let's provide a recommended solution to dealing with the common case of configuration files, since there are well-known approaches used successfully in many environments.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
---

Peff, since I've adopted a significant portion of what you've said here, it's probably worth getting your sign-off on this patch.

 Documentation/git-update-index.txt | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
Show changes to Documentation/git-update-index.txt +16 −0
diff --git a/Documentation/git-update-index.txt b/Documentation/git-update-index.txt
index c7a6271daf..1489cb09a0 100644
--- a/Documentation/git-update-index.txt
+++ b/Documentation/git-update-index.txt
@@ -549,6 +549,22 @@ The untracked cache extension can be enabled by the
 `core.untrackedCache` configuration variable (see
 linkgit:git-config[1]).
 
+NOTES
+-----
+
+Users often try to use the assume-unchanged and skip-worktree bits
+to tell Git to ignore changes to files that are tracked.  This does not
+work as expected, since Git may still check working tree files against
+the index when performing certain operations.  In general, Git does not
+provide a way to ignore changes to tracked files, so alternate solutions
+are recommended.
+
+For example, if the file you want to change is some sort of config file,
+the repository can include a sample config file that can then be copied
+into the ignored name and modified.  The repository can even include a
+script to treat the sample file as a template, modifying and copying it
+automatically.
+
 SEE ALSO
 --------
 linkgit:git-config[1],
Jeff King· Jan 20, 2020, 17:54 UTC · re: brian m. carlson · lore

Re: [PATCH v4 4/5] doc: dissuade users from trying to ignore tracked files

On Mon, Jan 20, 2020 at 05:33:42PM +0000, brian m. carlson wrote:
> Peff, since I've adopted a significant portion of what you've said here,
> it's probably worth getting your sign-off on this patch.
Sure thing:
  Signed-off-by: Jeff King <peff@peff.net>
And the patch itself looks good to me.
-Peff
brian m. carlson· Jan 20, 2020, 17:33 UTC · re: brian m. carlson · lore

[PATCH v4 1/5] doc: move author and committer information to git-commit(1)

While at one time it made perfect sense to store information about configuring author and committer information in the documentation for git commit-tree, in modern Git that operation is seldom used. Most users will use git commit and expect to find comprehensive documentation about its use in the manual page for that command.

Considering that there is significant confusion about how one is to use the user.name and user.email variables, let's put as much documentation as possible into an obvious place where users will be more likely to find it.

In addition, expand the environment variables section to describe their use more fully. Even though we now describe all of the options there and in the configuration settings documentation, preserve the existing text in git-commit.txt so that people can easily reason about the ordering of the various options they can use. Explain the use of the author.* and committer.* options as well.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
---
 Documentation/config/user.txt     |  2 +-
 Documentation/git-commit-tree.txt | 26 +++++---------------------
 Documentation/git-commit.txt      | 27 ++++++++++++++++++++++++---
 Documentation/git.txt             | 27 +++++++++++++++++++++++++--
 4 files changed, 55 insertions(+), 27 deletions(-)
Show changes to 4 files +55 −27

Documentation/config/user.txt, Documentation/git-commit-tree.txt, Documentation/git-commit.txt, Documentation/git.txt

diff --git a/Documentation/config/user.txt b/Documentation/config/user.txt
index 0557cbbceb..a1f80e823c 100644
--- a/Documentation/config/user.txt
+++ b/Documentation/config/user.txt
@@ -13,7 +13,7 @@ committer.email::
 	Also, all of these can be overridden by the `GIT_AUTHOR_NAME`,
 	`GIT_AUTHOR_EMAIL`, `GIT_COMMITTER_NAME`,
 	`GIT_COMMITTER_EMAIL` and `EMAIL` environment variables.
-	See linkgit:git-commit-tree[1] for more information.
+	See linkgit:git-commit[1] for more information.
 
 user.useConfigOnly::
 	Instruct Git to avoid trying to guess defaults for `user.email`
diff --git a/Documentation/git-commit-tree.txt b/Documentation/git-commit-tree.txt
index 4b90b9c12a..adc2e0d4b7 100644
--- a/Documentation/git-commit-tree.txt
+++ b/Documentation/git-commit-tree.txt
@@ -42,6 +42,10 @@ tend to just write the result to the file that is pointed at by
 `.git/HEAD`, so that we can always see what the last committed
 state was.
 
+A commit comment is read from stdin. If a changelog
+entry is not provided via "<" redirection, 'git commit-tree' will just wait
+for one to be entered and terminated with ^D.
+
 OPTIONS
 -------
 <tree>::
@@ -69,7 +73,6 @@ OPTIONS
 	Do not GPG-sign commit, to countermand a `--gpg-sign` option
 	given earlier on the command line.
 
-
 Commit Information
 ------------------
 
@@ -79,26 +82,6 @@ A commit encapsulates:
 - author name, email and date
 - committer name and email and the commit time.
 
-While parent object ids are provided on the command line, author and
-committer information is taken from the following environment variables,
-if set:
-
-	GIT_AUTHOR_NAME
-	GIT_AUTHOR_EMAIL
-	GIT_AUTHOR_DATE
-	GIT_COMMITTER_NAME
-	GIT_COMMITTER_EMAIL
-	GIT_COMMITTER_DATE
-
-(nb "<", ">" and "\n"s are stripped)
-
-In case (some of) these environment variables are not set, the information
-is taken from the configuration items user.name and user.email, or, if not
-present, the environment variable EMAIL, or, if that is not set,
-system user name and the hostname used for outgoing mail (taken
-from `/etc/mailname` and falling back to the fully qualified hostname when
-that file does not exist).
-
 A commit comment is read from stdin. If a changelog
 entry is not provided via "<" redirection, 'git commit-tree' will just wait
 for one to be entered and terminated with ^D.
@@ -117,6 +100,7 @@ FILES
 SEE ALSO
 --------
 linkgit:git-write-tree[1]
+linkgit:git-commit[1]
 
 GIT
 ---
diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt
index ced5a9beab..30c30ccd80 100644
--- a/Documentation/git-commit.txt
+++ b/Documentation/git-commit.txt
@@ -367,9 +367,6 @@ changes to tracked files.
 +
 For more details, see the 'pathspec' entry in linkgit:gitglossary[7].
 
-:git-commit: 1
-include::date-formats.txt[]
-
 EXAMPLES
 --------
 When recording your own work, the contents of modified files in
@@ -463,6 +460,30 @@ alter the order the changes are committed, because the merge
 should be recorded as a single commit.  In fact, the command
 refuses to run when given pathnames (but see `-i` option).
 
+COMMIT INFORMATION
+------------------
+
+Author and committer information is taken from the following environment
+variables, if set:
+
+	GIT_AUTHOR_NAME
+	GIT_AUTHOR_EMAIL
+	GIT_AUTHOR_DATE
+	GIT_COMMITTER_NAME
+	GIT_COMMITTER_EMAIL
+	GIT_COMMITTER_DATE
+
+(nb "<", ">" and "\n"s are stripped)
+
+In case (some of) these environment variables are not set, the information
+is taken from the configuration items `user.name` and `user.email`, or, if not
+present, the environment variable EMAIL, or, if that is not set,
+system user name and the hostname used for outgoing mail (taken
+from `/etc/mailname` and falling back to the fully qualified hostname when
+that file does not exist).
+
+:git-commit: 1
+include::date-formats.txt[]
 
 DISCUSSION
 ----------
diff --git a/Documentation/git.txt b/Documentation/git.txt
index b1597ac002..0093c647bf 100644
--- a/Documentation/git.txt
+++ b/Documentation/git.txt
@@ -482,13 +482,36 @@ double-quotes and respecting backslash escapes. E.g., the value
 Git Commits
 ~~~~~~~~~~~
 `GIT_AUTHOR_NAME`::
+	The human-readable name used in the author identity when creating commit or
+	tag objects, or when writing reflogs. Overrides the `user.name` and
+	`author.name` configuration settings.
+
 `GIT_AUTHOR_EMAIL`::
+	The email address used in the author identity when creating commit or
+	tag objects, or when writing reflogs. Overrides the `user.email` and
+	`author.email` configuration settings.
+
 `GIT_AUTHOR_DATE`::
+	The date used for the author identity when creating commit or tag objects, or
+	when writing reflogs. See linkgit:git-commit[1] for valid formats.
+
 `GIT_COMMITTER_NAME`::
+	The human-readable name used in the committer identity when creating commit or
+	tag objects, or when writing reflogs. Overrides the `user.name` and
+	`committer.name` configuration settings.
+
 `GIT_COMMITTER_EMAIL`::
+	The email address used in the author identity when creating commit or
+	tag objects, or when writing reflogs. Overrides the `user.email` and
+	`committer.email` configuration settings.
+
 `GIT_COMMITTER_DATE`::
-'EMAIL'::
-	see linkgit:git-commit-tree[1]
+	The date used for the committer identity when creating commit or tag objects, or
+	when writing reflogs. See linkgit:git-commit[1] for valid formats.
+
+`EMAIL`::
+	The email address used in the author and committer identities if no other
+	relevant environment variable or configuration setting has been set.
 
 Git Diffs
 ~~~~~~~~~
Jeff King· Jan 20, 2020, 17:52 UTC · re: brian m. carlson · lore

Re: [PATCH v4 1/5] doc: move author and committer information to git-commit(1)

On Mon, Jan 20, 2020 at 05:33:39PM +0000, brian m. carlson wrote:
Show 15 quoted lines
> diff --git a/Documentation/git-commit-tree.txt b/Documentation/git-commit-tree.txt
> index 4b90b9c12a..adc2e0d4b7 100644
> --- a/Documentation/git-commit-tree.txt
> +++ b/Documentation/git-commit-tree.txt
> @@ -42,6 +42,10 @@ tend to just write the result to the file that is pointed at by
>  `.git/HEAD`, so that we can always see what the last committed
>  state was.
>  
> +A commit comment is read from stdin. If a changelog
> +entry is not provided via "<" redirection, 'git commit-tree' will just wait
> +for one to be entered and terminated with ^D.
> +
>  OPTIONS
>  -------
>  <tree>::
This text got moved up, which kind of make sense to me, but...
Show 27 quoted lines
> @@ -79,26 +82,6 @@ A commit encapsulates:
>  - author name, email and date
>  - committer name and email and the commit time.
>  
> -While parent object ids are provided on the command line, author and
> -committer information is taken from the following environment variables,
> -if set:
> -
> -	GIT_AUTHOR_NAME
> -	GIT_AUTHOR_EMAIL
> -	GIT_AUTHOR_DATE
> -	GIT_COMMITTER_NAME
> -	GIT_COMMITTER_EMAIL
> -	GIT_COMMITTER_DATE
> -
> -(nb "<", ">" and "\n"s are stripped)
> -
> -In case (some of) these environment variables are not set, the information
> -is taken from the configuration items user.name and user.email, or, if not
> -present, the environment variable EMAIL, or, if that is not set,
> -system user name and the hostname used for outgoing mail (taken
> -from `/etc/mailname` and falling back to the fully qualified hostname when
> -that file does not exist).
> -
>  A commit comment is read from stdin. If a changelog
>  entry is not provided via "<" redirection, 'git commit-tree' will just wait
>  for one to be entered and terminated with ^D.

it stayed here, so now it's duplicated. Should the old one be dropped? Or is moving the new text a leftover mistake from rebasing (IIRC, in your original you dropped this whole "here's how commits work" section).

Other than that, the patch looks good to me.
-Peff
brian m. carlson· Jan 20, 2020, 19:22 UTC · re: Jeff King · lore

Re: [PATCH v4 1/5] doc: move author and committer information to git-commit(1)

On 2020-01-20 at 17:52:10, Jeff King wrote:
Show 25 quoted lines
> On Mon, Jan 20, 2020 at 05:33:39PM +0000, brian m. carlson wrote:
> 
> > diff --git a/Documentation/git-commit-tree.txt b/Documentation/git-commit-tree.txt
> > index 4b90b9c12a..adc2e0d4b7 100644
> > --- a/Documentation/git-commit-tree.txt
> > +++ b/Documentation/git-commit-tree.txt
> > @@ -42,6 +42,10 @@ tend to just write the result to the file that is pointed at by
> >  `.git/HEAD`, so that we can always see what the last committed
> >  state was.
> >  
> > +A commit comment is read from stdin. If a changelog
> > +entry is not provided via "<" redirection, 'git commit-tree' will just wait
> > +for one to be entered and terminated with ^D.
> > +
> >  OPTIONS
> >  -------
> >  <tree>::
> 
> This text got moved up, which kind of make sense to me, but...
> 
> it stayed here, so now it's duplicated. Should the old one be dropped?
> Or is moving the new text a leftover mistake from rebasing (IIRC, in
> your original you dropped this whole "here's how commits work" section).
> 
> Other than that, the patch looks good to me.

Thanks for pointing this out. I'll fix it and if nobody else has comments today, send out a v5 later this week, probably tomorrow.

-- 
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204
Junio C Hamano· Jan 21, 2020, 22:24 UTC · re: Jeff King · lore

Re: [PATCH v4 1/5] doc: move author and committer information to git-commit(1)

Jeff King <peff@peff.net> writes:
Show 7 quoted lines
>>  A commit comment is read from stdin. If a changelog
>>  entry is not provided via "<" redirection, 'git commit-tree' will just wait
>>  for one to be entered and terminated with ^D.
>
> it stayed here, so now it's duplicated. Should the old one be dropped?
> Or is moving the new text a leftover mistake from rebasing (IIRC, in
> your original you dropped this whole "here's how commits work" section).
Ah, you spotted the same thing.
Junio C Hamano· Jan 21, 2020, 22:23 UTC · re: brian m. carlson · lore

Re: [PATCH v4 1/5] doc: move author and committer information to git-commit(1)

"brian m. carlson" <sandals@crustytoothpaste.net> writes:
Show 10 quoted lines
> diff --git a/Documentation/config/user.txt b/Documentation/config/user.txt
> index 0557cbbceb..a1f80e823c 100644
> --- a/Documentation/config/user.txt
> +++ b/Documentation/config/user.txt
> @@ -13,7 +13,7 @@ committer.email::
>  	Also, all of these can be overridden by the `GIT_AUTHOR_NAME`,
>  	`GIT_AUTHOR_EMAIL`, `GIT_COMMITTER_NAME`,
>  	`GIT_COMMITTER_EMAIL` and `EMAIL` environment variables.
> -	See linkgit:git-commit-tree[1] for more information.
> +	See linkgit:git-commit[1] for more information.

Makes sense---it is consistent with the goal of making the documentation of "git commit" Porcelain the central place for authorship and committer information.

Show 11 quoted lines
> diff --git a/Documentation/git-commit-tree.txt b/Documentation/git-commit-tree.txt
> index 4b90b9c12a..adc2e0d4b7 100644
> --- a/Documentation/git-commit-tree.txt
> +++ b/Documentation/git-commit-tree.txt
> @@ -42,6 +42,10 @@ tend to just write the result to the file that is pointed at by
>  `.git/HEAD`, so that we can always see what the last committed
>  state was.
>  
> +A commit comment is read from stdin. If a changelog
> +entry is not provided via "<" redirection, 'git commit-tree' will just wait
> +for one to be entered and terminated with ^D.

This is copied from the end of the "commit information" section, without the original getting removed (see the post-context of the hunk that begins at l.79/l.82). Intended?

I haven't seen anybody use the phrase "commit comment" in the reviews on this list for long time; the phrase somehow feels outdated. The pretty formats section in "git log --help" calls this "commit message". "log message" may also be more common.

Show 20 quoted lines
> @@ -69,7 +73,6 @@ OPTIONS
>  	Do not GPG-sign commit, to countermand a `--gpg-sign` option
>  	given earlier on the command line.
>  
> -
>  Commit Information
>  ------------------
>  
> @@ -79,26 +82,6 @@ A commit encapsulates:
>  - author name, email and date
>  - committer name and email and the commit time.
>  
> -While parent object ids are provided on the command line, author and
> -...
> -that file does not exist).
> -
>  A commit comment is read from stdin. If a changelog
>  entry is not provided via "<" redirection, 'git commit-tree' will just wait
>  for one to be entered and terminated with ^D.
> @@ -117,6 +100,7 @@ FILES
brian m. carlson· Jan 20, 2020, 17:33 UTC · re: brian m. carlson · lore

[PATCH v4 5/5] docs: mention when increasing http.postBuffer is valuable

Users in a wide variety of situations find themselves with HTTP push problems. Oftentimes these issues are due to antivirus software, filtering proxies, or other man-in-the-middle situations; other times, they are due to simple unreliability of the network.

However, a common solution to HTTP push problems found online is to increase http.postBuffer. This works for none of the aforementioned situations and is only useful in a small, highly restricted number of cases: essentially, when the connection does not properly support HTTP/1.1.

Document when raising this value is appropriate and what it actually does, and discourage people from using it as a general solution for push problems, since it is not effective there.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
---
 Documentation/config/http.txt | 8 ++++++++
 1 file changed, 8 insertions(+)
Show changes to Documentation/config/http.txt +8 −0
diff --git a/Documentation/config/http.txt b/Documentation/config/http.txt
index 5a32f5b0a5..3d1db91f05 100644
--- a/Documentation/config/http.txt
+++ b/Documentation/config/http.txt
@@ -199,6 +199,14 @@ http.postBuffer::
 	Transfer-Encoding: chunked is used to avoid creating a
 	massive pack file locally.  Default is 1 MiB, which is
 	sufficient for most requests.
++
+Note that raising this limit is only effective for disabling chunked
+transfer encoding and therefore should be used only where the remote
+server or a proxy only supports HTTP/1.0 or is noncompliant with the
+HTTP standard.  Raising this is not, in general, an effective solution
+for most push problems, but can increase memory consumption
+significantly since the entire buffer is allocated even for small
+pushes.
 
 http.lowSpeedLimit, http.lowSpeedTime::
 	If the HTTP transfer speed is less than 'http.lowSpeedLimit'
brian m. carlson· Jan 20, 2020, 17:33 UTC · re: brian m. carlson · lore

[PATCH v4 3/5] doc: provide guidance on user.name format

It's a frequent misconception that the user.name variable controls authentication in some way, and as a result, beginning users frequently attempt to change it when they're having authentication troubles. Document that the convention is that this variable represents some form of a human's personal name, although that is not required. In addition, address concerns about whether Unicode is supported.

Use the term "personal name" as this is likely to draw the intended contrast, be applicable across cultures which may have different naming conventions, and be easily understandable to people who do not speak English as their first language. Indicate that "some form" is conventionally used, as people may use a nickname or preferred name instead of a full legal name.

Point users who may be confused about authentication to an appropriate configuration option instead. Provide a shortened form of this information in the configuration option description.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
---
 Documentation/config/user.txt | 7 ++++++-
 Documentation/git-commit.txt  | 6 ++++++
 2 files changed, 12 insertions(+), 1 deletion(-)
Show changes to 2 files +12 −1

Documentation/config/user.txt, Documentation/git-commit.txt

diff --git a/Documentation/config/user.txt b/Documentation/config/user.txt
index a1f80e823c..f0edb06329 100644
--- a/Documentation/config/user.txt
+++ b/Documentation/config/user.txt
@@ -13,7 +13,12 @@ committer.email::
 	Also, all of these can be overridden by the `GIT_AUTHOR_NAME`,
 	`GIT_AUTHOR_EMAIL`, `GIT_COMMITTER_NAME`,
 	`GIT_COMMITTER_EMAIL` and `EMAIL` environment variables.
-	See linkgit:git-commit[1] for more information.
++
+Note that the `name` forms of these variables conventionally refer to
+some form of a personal name.
+See linkgit:git-commit[1] for more information on these settings and
+the `credential.username` option if you're looking for authentication
+credentials instead.
 
 user.useConfigOnly::
 	Instruct Git to avoid trying to guess defaults for `user.email`
diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt
index 7b61c9ba79..13f653989f 100644
--- a/Documentation/git-commit.txt
+++ b/Documentation/git-commit.txt
@@ -475,6 +475,12 @@ variables, if set:
 
 (nb "<", ">" and "\n"s are stripped)
 
+The author and committer names are by convention some form of a personal name
+(that is, the name by which other humans refer to you), although Git does not
+enforce or require any particular form. Arbitrary Unicode may be used, subject
+to the constraints listed above. This name has no effect on authentication; for
+that, see the `credential.username` variable in linkgit:git-config[1].
+
 In case (some of) these environment variables are not set, the information
 is taken from the configuration items `user.name` and `user.email`, or, if not
 present, the environment variable EMAIL, or, if that is not set,
Junio C Hamano· Jan 21, 2020, 22:35 UTC · re: brian m. carlson · lore

Re: [PATCH v4 3/5] doc: provide guidance on user.name format

"brian m. carlson" <sandals@crustytoothpaste.net> writes:
Show 13 quoted lines
> diff --git a/Documentation/config/user.txt b/Documentation/config/user.txt
> index a1f80e823c..f0edb06329 100644
> --- a/Documentation/config/user.txt
> +++ b/Documentation/config/user.txt
> @@ -13,7 +13,12 @@ committer.email::
>  	Also, all of these can be overridden by the `GIT_AUTHOR_NAME`,
>  	`GIT_AUTHOR_EMAIL`, `GIT_COMMITTER_NAME`,
>  	`GIT_COMMITTER_EMAIL` and `EMAIL` environment variables.
> -	See linkgit:git-commit[1] for more information.
> ++
> +Note that the `name` forms of these variables conventionally refer to
> +some form of a personal name.
> +See linkgit:git-commit[1] for more information on these settings and

The environment variables section of git(1) seems to be much more detailed than what we have in git-commit(1) after the two previous steps. I do not mind keeping the reference to git-commit here, but I think it is also OK to refer to the description in git(1) there, too.

Show 14 quoted lines
> diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt
> index 7b61c9ba79..13f653989f 100644
> --- a/Documentation/git-commit.txt
> +++ b/Documentation/git-commit.txt
> @@ -475,6 +475,12 @@ variables, if set:
>  
>  (nb "<", ">" and "\n"s are stripped)
>  
> +The author and committer names are by convention some form of a personal name
> +(that is, the name by which other humans refer to you), although Git does not
> +enforce or require any particular form. Arbitrary Unicode may be used, subject
> +to the constraints listed above. This name has no effect on authentication; for
> +that, see the `credential.username` variable in linkgit:git-config[1].
> +
Good.
Jeff King· Jan 20, 2020, 17:55 UTC · re: brian m. carlson · lore

Re: [PATCH v4 0/6] Documentation for common user misconceptions

On Mon, Jan 20, 2020 at 05:33:38PM +0000, brian m. carlson wrote:
> This is v4 of a series improving the documentation to cover common user
> misconceptions.

With the exception of the minor issue I pointed out in patch 1, these all look good to me.

-Peff

← back to recent threads