diff mbox series

[v2] doc: fix non-existent config name

Message ID CAEg0tHSZi22RUBREJB=Cfy6O72cicv9FTkgo_Z=gvGRdPK1acw@mail.gmail.com (mailing list archive)
State New, archived
Headers show
Series [v2] doc: fix non-existent config name | expand

Commit Message

Yukai Chou Jan. 14, 2023, 1:12 a.m. UTC
From c879cb10f61afc361c484267f498d5815bc1b932 Mon Sep 17 00:00:00 2001
From: muzimuzhi <muzimuzhi@gmail.com>
Date: Mon, 9 Jan 2023 06:37:47 +0800
Subject: [PATCH v2] doc: fix non-existent config name

Replace non-existent `branch.<name>.fetch` to `remote.<repository>.fetch`, in
the first example in `git-fetch` doc, which was introduced in
d504f6975d (modernize fetch/merge/pull examples, 2009-10-21).

Rename placeholder `<name>` to `<repository>`, to be consistent with all other
uses in git docs, except that `git-config.txt` uses `remote.<name>.fetch` in
its "Variables" section.

Also add missing monospace markups.

Signed-off-by: Yukai Chou <muzimuzhi@gmail.com>
---

Changes compared to PATCH v1:
 - Use real name in sign-off
 - Update commit reference in a non-shallow clone, resulting in longer
   <abbrev-hash>
 - Use word "non-existent" in commit message uniformly
 - Rebase to latest master a38d39a4c5 (The sixth batch, 2023-01-08)

 Documentation/git-fetch.txt | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Junio C Hamano Jan. 14, 2023, 1:33 a.m. UTC | #1
muzimuzhi Z <muzimuzhi@gmail.com> writes:

> From c879cb10f61afc361c484267f498d5815bc1b932 Mon Sep 17 00:00:00 2001
> From: muzimuzhi <muzimuzhi@gmail.com>

The "author identity" is taken from this line (or from the e-mail
header), and it should be identical to your sign-off.

> Date: Mon, 9 Jan 2023 06:37:47 +0800
> Subject: [PATCH v2] doc: fix non-existent config name

In general, there shouldn't be a reason to include the above four
lines in your message body.  An exception is "From:" to override the
author identity when you cannot send your e-mail using the same name
as what is used on your sign-off.  See Discussion section of "git am"
manual page.

> Replace non-existent `branch.<name>.fetch` to `remote.<repository>.fetch`, in
> the first example in `git-fetch` doc, which was introduced in
> d504f6975d (modernize fetch/merge/pull examples, 2009-10-21).
>
> Rename placeholder `<name>` to `<repository>`, to be consistent with all other
> uses in git docs, except that `git-config.txt` uses `remote.<name>.fetch` in
> its "Variables" section.
>
> Also add missing monospace markups.
>
> Signed-off-by: Yukai Chou <muzimuzhi@gmail.com>

Perfect.  Will queue.

> Changes compared to PATCH v1:

>  - Update commit reference in a non-shallow clone, resulting in longer
>    <abbrev-hash>

Great.

> diff --git a/Documentation/git-fetch.txt b/Documentation/git-fetch.txt
> index 63d9569e16..fba66f1460 100644
> --- a/Documentation/git-fetch.txt
> +++ b/Documentation/git-fetch.txt
> @@ -251,10 +251,10 @@ EXAMPLES
>  $ git fetch origin
>  ------------------------------------------------
>  +
> -The above command copies all branches from the remote refs/heads/
> -namespace and stores them to the local refs/remotes/origin/ namespace,
> -unless the branch.<name>.fetch option is used to specify a non-default
> -refspec.
> +The above command copies all branches from the remote `refs/heads/`
> +namespace and stores them to the local `refs/remotes/origin/` namespace,
> +unless the `remote.<repository>.fetch` option is used to specify a
> +non-default refspec.
>
>  * Using refspecs explicitly:
>  +
diff mbox series

Patch

diff --git a/Documentation/git-fetch.txt b/Documentation/git-fetch.txt
index 63d9569e16..fba66f1460 100644
--- a/Documentation/git-fetch.txt
+++ b/Documentation/git-fetch.txt
@@ -251,10 +251,10 @@  EXAMPLES
 $ git fetch origin
 ------------------------------------------------
 +
-The above command copies all branches from the remote refs/heads/
-namespace and stores them to the local refs/remotes/origin/ namespace,
-unless the branch.<name>.fetch option is used to specify a non-default
-refspec.
+The above command copies all branches from the remote `refs/heads/`
+namespace and stores them to the local `refs/remotes/origin/` namespace,
+unless the `remote.<repository>.fetch` option is used to specify a
+non-default refspec.

 * Using refspecs explicitly:
 +