* [PATCH 0/2] git-pull.txt: correct outdated example + link to specific 'git fetch' section
@ 2020-04-05 15:50 Philippe Blain via GitGitGadget
2020-04-05 15:50 ` [PATCH 1/2] pull doc: refer to a specific section in 'fetch' doc Philippe Blain via GitGitGadget
2020-04-05 15:50 ` [PATCH 2/2] pull doc: correct outdated description of an example Philippe Blain via GitGitGadget
0 siblings, 2 replies; 6+ messages in thread
From: Philippe Blain via GitGitGadget @ 2020-04-05 15:50 UTC (permalink / raw)
To: git; +Cc: Jeff King, Marc Branchaud, Clemens Buchacher, Philippe Blain
I was reading the git pull documentation and discovered an outdated example
description. While reading the git fetch documentation to confirm the
behaviour described ingit pull was indeed wrong, I figured it would be
easier to refer directly to the "Configured remote-tracking branches"
section in git fetch from the git pull documentation, just as in git fetch.
Philippe Blain (2):
pull doc: refer to a specific section in 'fetch' doc
pull doc: correct outdated description of an example
Documentation/git-pull.txt | 6 +++---
Documentation/pull-fetch-param.txt | 3 ++-
2 files changed, 5 insertions(+), 4 deletions(-)
base-commit: 9fadedd637b312089337d73c3ed8447e9f0aa775
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-751%2Fphil-blain%2Fdoc-pull-update-remote-tracking-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-751/phil-blain/doc-pull-update-remote-tracking-v1
Pull-Request: https://github.com/git/git/pull/751
--
gitgitgadget
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/2] pull doc: refer to a specific section in 'fetch' doc
2020-04-05 15:50 [PATCH 0/2] git-pull.txt: correct outdated example + link to specific 'git fetch' section Philippe Blain via GitGitGadget
@ 2020-04-05 15:50 ` Philippe Blain via GitGitGadget
2020-04-06 20:19 ` Jeff King
2020-04-05 15:50 ` [PATCH 2/2] pull doc: correct outdated description of an example Philippe Blain via GitGitGadget
1 sibling, 1 reply; 6+ messages in thread
From: Philippe Blain via GitGitGadget @ 2020-04-05 15:50 UTC (permalink / raw)
To: git
Cc: Jeff King, Marc Branchaud, Clemens Buchacher, Philippe Blain,
Philippe Blain
From: Philippe Blain <levraiphilippeblain@gmail.com>
The documentation for the `<refspec>` parameter in the `git fetch`
documentation refers to the section "CONFIGURED REMOTE-TRACKING
BRANCHES" in this same documentation page.
In the `git pull` documentation, let's also refer specifically to this
section instead of just linking to the `git fetch` documentation.
Signed-off-by: Philippe Blain <levraiphilippeblain@gmail.com>
---
Documentation/pull-fetch-param.txt | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Documentation/pull-fetch-param.txt b/Documentation/pull-fetch-param.txt
index 7d3a60f5b93..95ea8499029 100644
--- a/Documentation/pull-fetch-param.txt
+++ b/Documentation/pull-fetch-param.txt
@@ -19,7 +19,8 @@ ifndef::git-pull[]
(see <<CRTB,CONFIGURED REMOTE-TRACKING BRANCHES>> below).
endif::git-pull[]
ifdef::git-pull[]
- (see linkgit:git-fetch[1]).
+ (see the section "CONFIGURED REMOTE-TRACKING BRANCHES"
+ in linkgit:git-fetch[1]).
endif::git-pull[]
+
The format of a <refspec> parameter is an optional plus
--
gitgitgadget
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] pull doc: correct outdated description of an example
2020-04-05 15:50 [PATCH 0/2] git-pull.txt: correct outdated example + link to specific 'git fetch' section Philippe Blain via GitGitGadget
2020-04-05 15:50 ` [PATCH 1/2] pull doc: refer to a specific section in 'fetch' doc Philippe Blain via GitGitGadget
@ 2020-04-05 15:50 ` Philippe Blain via GitGitGadget
2020-04-06 20:22 ` Jeff King
1 sibling, 1 reply; 6+ messages in thread
From: Philippe Blain via GitGitGadget @ 2020-04-05 15:50 UTC (permalink / raw)
To: git
Cc: Jeff King, Marc Branchaud, Clemens Buchacher, Philippe Blain,
Philippe Blain
From: Philippe Blain <levraiphilippeblain@gmail.com>
Since f269048754 (fetch: opportunistically update tracking refs,
2013-05-11), the underlying `git fetch` in `git pull <remote> <branch>`
updates the configured remote-tracking branch for <branch>.
However, an example in the 'Examples' section of the `git pull`
documentation still states that this is not the case.
Correct the description of this example.
Signed-off-by: Philippe Blain <levraiphilippeblain@gmail.com>
---
Documentation/git-pull.txt | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Documentation/git-pull.txt b/Documentation/git-pull.txt
index dfb901f8b83..21e10905fa2 100644
--- a/Documentation/git-pull.txt
+++ b/Documentation/git-pull.txt
@@ -229,9 +229,9 @@ branch.<name>.merge options; see linkgit:git-config[1] for details.
$ git pull origin next
------------------------------------------------
+
-This leaves a copy of `next` temporarily in FETCH_HEAD, but
-does not update any remote-tracking branches. Using remote-tracking
-branches, the same can be done by invoking fetch and merge:
+This leaves a copy of `next` temporarily in FETCH_HEAD, and
+updates the remote-tracking branch `origin/next`.
+The same can be done by invoking fetch and merge:
+
------------------------------------------------
$ git fetch origin
--
gitgitgadget
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] pull doc: refer to a specific section in 'fetch' doc
2020-04-05 15:50 ` [PATCH 1/2] pull doc: refer to a specific section in 'fetch' doc Philippe Blain via GitGitGadget
@ 2020-04-06 20:19 ` Jeff King
2020-04-16 12:39 ` Philippe Blain
0 siblings, 1 reply; 6+ messages in thread
From: Jeff King @ 2020-04-06 20:19 UTC (permalink / raw)
To: Philippe Blain via GitGitGadget
Cc: git, Marc Branchaud, Clemens Buchacher, Philippe Blain
On Sun, Apr 05, 2020 at 03:50:18PM +0000, Philippe Blain via GitGitGadget wrote:
> From: Philippe Blain <levraiphilippeblain@gmail.com>
>
> The documentation for the `<refspec>` parameter in the `git fetch`
> documentation refers to the section "CONFIGURED REMOTE-TRACKING
> BRANCHES" in this same documentation page.
>
> In the `git pull` documentation, let's also refer specifically to this
> section instead of just linking to the `git fetch` documentation.
Makes sense. One thought:
> diff --git a/Documentation/pull-fetch-param.txt b/Documentation/pull-fetch-param.txt
> index 7d3a60f5b93..95ea8499029 100644
> --- a/Documentation/pull-fetch-param.txt
> +++ b/Documentation/pull-fetch-param.txt
> @@ -19,7 +19,8 @@ ifndef::git-pull[]
> (see <<CRTB,CONFIGURED REMOTE-TRACKING BRANCHES>> below).
> endif::git-pull[]
> ifdef::git-pull[]
> - (see linkgit:git-fetch[1]).
> + (see the section "CONFIGURED REMOTE-TRACKING BRANCHES"
> + in linkgit:git-fetch[1]).
> endif::git-pull[]
We can hyperlink directly to this section with the CRTB tag (as you can
see in the context above). But I guess we don't have a portable macro to
do so across different manpages. Assuming we'd need something like
linkgit to accomplish, it's best not to hold up this change waiting for
that.
-Peff
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] pull doc: correct outdated description of an example
2020-04-05 15:50 ` [PATCH 2/2] pull doc: correct outdated description of an example Philippe Blain via GitGitGadget
@ 2020-04-06 20:22 ` Jeff King
0 siblings, 0 replies; 6+ messages in thread
From: Jeff King @ 2020-04-06 20:22 UTC (permalink / raw)
To: Philippe Blain via GitGitGadget
Cc: git, Marc Branchaud, Clemens Buchacher, Philippe Blain
On Sun, Apr 05, 2020 at 03:50:19PM +0000, Philippe Blain via GitGitGadget wrote:
> From: Philippe Blain <levraiphilippeblain@gmail.com>
>
> Since f269048754 (fetch: opportunistically update tracking refs,
> 2013-05-11), the underlying `git fetch` in `git pull <remote> <branch>`
> updates the configured remote-tracking branch for <branch>.
>
> However, an example in the 'Examples' section of the `git pull`
> documentation still states that this is not the case.
>
> Correct the description of this example.
Yeah, I think the example just never got updated. Your patch looks good.
Another option would be to use a direct URL rather than a configured
remote, which really would just update FETCH_HEAD. But I don't think the
handling of remote-tracking branches is central to this example either
way, so your minimal change is better.
-Peff
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] pull doc: refer to a specific section in 'fetch' doc
2020-04-06 20:19 ` Jeff King
@ 2020-04-16 12:39 ` Philippe Blain
0 siblings, 0 replies; 6+ messages in thread
From: Philippe Blain @ 2020-04-16 12:39 UTC (permalink / raw)
To: Jeff King
Cc: Philippe Blain via GitGitGadget, git, Marc Branchaud,
Clemens Buchacher
Hi Peff,
> Le 6 avr. 2020 à 16:19, Jeff King <peff@peff.net> a écrit :
>
> One thought:
>
>> diff --git a/Documentation/pull-fetch-param.txt b/Documentation/pull-fetch-param.txt
>> index 7d3a60f5b93..95ea8499029 100644
>> --- a/Documentation/pull-fetch-param.txt
>> +++ b/Documentation/pull-fetch-param.txt
>> @@ -19,7 +19,8 @@ ifndef::git-pull[]
>> (see <<CRTB,CONFIGURED REMOTE-TRACKING BRANCHES>> below).
>> endif::git-pull[]
>> ifdef::git-pull[]
>> - (see linkgit:git-fetch[1]).
>> + (see the section "CONFIGURED REMOTE-TRACKING BRANCHES"
>> + in linkgit:git-fetch[1]).
>> endif::git-pull[]
>
> We can hyperlink directly to this section with the CRTB tag (as you can
> see in the context above). But I guess we don't have a portable macro to
> do so across different manpages. Assuming we'd need something like
> linkgit to accomplish, it's best not to hold up this change waiting for
> that.
I didn't know it was possible. I agree that cross-linking directly to a specific section would be
great, especially if it would work for the manpages, the HTML documentation as well as the website!
Philippe.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-04-16 12:40 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-05 15:50 [PATCH 0/2] git-pull.txt: correct outdated example + link to specific 'git fetch' section Philippe Blain via GitGitGadget
2020-04-05 15:50 ` [PATCH 1/2] pull doc: refer to a specific section in 'fetch' doc Philippe Blain via GitGitGadget
2020-04-06 20:19 ` Jeff King
2020-04-16 12:39 ` Philippe Blain
2020-04-05 15:50 ` [PATCH 2/2] pull doc: correct outdated description of an example Philippe Blain via GitGitGadget
2020-04-06 20:22 ` 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).