git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Did config `branch.<name>.fetch` ever exist?
@ 2023-01-07 17:34 muzimuzhi Z
  2023-01-08  4:35 ` Junio C Hamano
  0 siblings, 1 reply; 7+ messages in thread
From: muzimuzhi Z @ 2023-01-07 17:34 UTC (permalink / raw)
  To: git

Hi all,

(originally posted on stackoverflow: https://stackoverflow.com/q/75040372)

Git configuration `branch.<name>.fetch` is mentioned in the first
`git-fetch` example [1]:

> - Update the remote-tracking branches:
>       $ 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..fetch option is used to specify a non-default refspec.

But I can't find its doc in `git-config`'s doc. Did
`branch.<name>.fetch` ever exist?

Searching in `git-config`'s doc for configs starting with `branch.` or
ending with `.fetch`, it seems `branch.<name>.fetch` is a typo of
`remote.<name>.fetch`.

PS: That `git-fetch` example was added in commit d504f69 in 2009. [3]

[1] https://git-scm.com/docs/git-fetch#_examples
[2] https://git-scm.com/docs/git-config
[3] https://github.com/git/git/commit/d504f6975d34025ed3b5478b657789410b52cdb1

best regards,
Yukai Chou

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

* Re: Did config `branch.<name>.fetch` ever exist?
  2023-01-07 17:34 Did config `branch.<name>.fetch` ever exist? muzimuzhi Z
@ 2023-01-08  4:35 ` Junio C Hamano
  2023-01-09  4:18   ` [PATCH] doc: fix non-existing config name muzimuzhi Z
  0 siblings, 1 reply; 7+ messages in thread
From: Junio C Hamano @ 2023-01-08  4:35 UTC (permalink / raw)
  To: muzimuzhi Z, Clemens Buchacher; +Cc: git

muzimuzhi Z <muzimuzhi@gmail.com> writes:

> Git configuration `branch.<name>.fetch` is mentioned in the first
> `git-fetch` example [1]:
>
>> - Update the remote-tracking branches:
>>       $ 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.
>
> But I can't find its doc in `git-config`'s doc. Did
> `branch.<name>.fetch` ever exist?
>
> Searching in `git-config`'s doc for configs starting with `branch.` or
> ending with `.fetch`, it seems `branch.<name>.fetch` is a typo of
> `remote.<name>.fetch`.

Correct.  Care to send a patch to correct it?

Thanks.


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

* [PATCH] doc: fix non-existing config name
  2023-01-08  4:35 ` Junio C Hamano
@ 2023-01-09  4:18   ` muzimuzhi Z
  2023-01-09 21:38     ` muzimuzhi Z
  0 siblings, 1 reply; 7+ messages in thread
From: muzimuzhi Z @ 2023-01-09  4:18 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Clemens Buchacher, git

Replace non-existent `branch.<name>.fetch` to `remote.<repository>.fetch`, in
the first example in `git-fetch` doc, which was introduced in
d504f69 (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: muzimuzhi <muzimuzhi@gmail.com>
---
 Documentation/git-fetch.txt | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/Documentation/git-fetch.txt b/Documentation/git-fetch.txt
index 63d9569..fba66f1 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:
 +
-- 
2.39.0

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

* Re: [PATCH] doc: fix non-existing config name
  2023-01-09  4:18   ` [PATCH] doc: fix non-existing config name muzimuzhi Z
@ 2023-01-09 21:38     ` muzimuzhi Z
  2023-01-13 17:54       ` Junio C Hamano
  0 siblings, 1 reply; 7+ messages in thread
From: muzimuzhi Z @ 2023-01-09 21:38 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Clemens Buchacher, git

Somehow My last mail failed to sent to Clemens Buchacher (drizzd@aon.at):

> 550 5.7.1 <drizzd@aon.at>: Recipient address rejected: mailbox not found

I found two lines about Clemens in `.mailmap` (see below) [1] and
drizzd@gmx.net was used last time when Clemens mailed to the current
mailing list in Feb 2019 [2].

    Clemens Buchacher <drizzd@gmx.net> <drizzd@aon.at>
    Clemens Buchacher <drizzd@gmx.net> <clemens.buchacher@intel.com>

Thus I added drizzd@gmx.net to cc.

yukai

[1] https://github.com/git/git/blob/a38d39a4c50d1275833aba54c4dbdfce9e2e9ca1/.mailmap#L45-L46
[2] https://lore.kernel.org/git/B168DCB1-7A69-4729-89C7-B513464DD468@gmx.net/

muzimuzhi Z <muzimuzhi@gmail.com> 于2023年1月9日周一 12:18写道:
>
> Replace non-existent `branch.<name>.fetch` to `remote.<repository>.fetch`, in
> the first example in `git-fetch` doc, which was introduced in
> d504f69 (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: muzimuzhi <muzimuzhi@gmail.com>
> ---
>  Documentation/git-fetch.txt | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/Documentation/git-fetch.txt b/Documentation/git-fetch.txt
> index 63d9569..fba66f1 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:
>  +
> --
> 2.39.0

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

* Re: [PATCH] doc: fix non-existing config name
  2023-01-09 21:38     ` muzimuzhi Z
@ 2023-01-13 17:54       ` Junio C Hamano
  2023-01-14  1:12         ` [PATCH v2] doc: fix non-existent " muzimuzhi Z
  0 siblings, 1 reply; 7+ messages in thread
From: Junio C Hamano @ 2023-01-13 17:54 UTC (permalink / raw)
  To: muzimuzhi Z; +Cc: Clemens Buchacher, git

muzimuzhi Z <muzimuzhi@gmail.com> writes:

> Somehow My last mail failed to sent to Clemens Buchacher (drizzd@aon.at):
>
>> 550 5.7.1 <drizzd@aon.at>: Recipient address rejected: mailbox not found
>
> I found two lines about Clemens in `.mailmap` (see below) [1] and
> drizzd@gmx.net was used last time when Clemens mailed to the current
> mailing list in Feb 2019 [2].
>
>     Clemens Buchacher <drizzd@gmx.net> <drizzd@aon.at>
>     Clemens Buchacher <drizzd@gmx.net> <clemens.buchacher@intel.com>
>
> Thus I added drizzd@gmx.net to cc.

Thanks for the above explanation.

> yukai

Is that your name, or is it "muzimuzhi Z"?  Please see and follow
Documentation/SubmittingPatches:[[sign-off]] and [[real-name]]
sections.

The patch, including the proposed log message, looks excellent.

Thanks.

>> Replace non-existent `branch.<name>.fetch` to `remote.<repository>.fetch`, in
>> the first example in `git-fetch` doc, which was introduced in
>> d504f69 (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: muzimuzhi <muzimuzhi@gmail.com>
>> ---
>>  Documentation/git-fetch.txt | 8 ++++----
>>  1 file changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/Documentation/git-fetch.txt b/Documentation/git-fetch.txt
>> index 63d9569..fba66f1 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:
>>  +
>> --
>> 2.39.0

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

* [PATCH v2] doc: fix non-existent config name
  2023-01-13 17:54       ` Junio C Hamano
@ 2023-01-14  1:12         ` muzimuzhi Z
  2023-01-14  1:33           ` Junio C Hamano
  0 siblings, 1 reply; 7+ messages in thread
From: muzimuzhi Z @ 2023-01-14  1:12 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Clemens Buchacher, git

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(-)

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:
 +
-- 
2.39.0

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

* Re: [PATCH v2] doc: fix non-existent config name
  2023-01-14  1:12         ` [PATCH v2] doc: fix non-existent " muzimuzhi Z
@ 2023-01-14  1:33           ` Junio C Hamano
  0 siblings, 0 replies; 7+ messages in thread
From: Junio C Hamano @ 2023-01-14  1:33 UTC (permalink / raw)
  To: muzimuzhi Z; +Cc: Clemens Buchacher, git

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:
>  +

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

end of thread, other threads:[~2023-01-14  1:33 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-07 17:34 Did config `branch.<name>.fetch` ever exist? muzimuzhi Z
2023-01-08  4:35 ` Junio C Hamano
2023-01-09  4:18   ` [PATCH] doc: fix non-existing config name muzimuzhi Z
2023-01-09 21:38     ` muzimuzhi Z
2023-01-13 17:54       ` Junio C Hamano
2023-01-14  1:12         ` [PATCH v2] doc: fix non-existent " muzimuzhi Z
2023-01-14  1:33           ` Junio C Hamano

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