git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] fetch, pull doc: correct description of '--set-upstream'
@ 2020-08-12 23:52 Philippe Blain via GitGitGadget
  2020-08-13 18:20 ` Junio C Hamano
  0 siblings, 1 reply; 2+ messages in thread
From: Philippe Blain via GitGitGadget @ 2020-08-12 23:52 UTC (permalink / raw)
  To: git
  Cc: Corentin BOMPARD, Nathan BERBEZIER, Pablo CHABANNE, Matthieu Moy,
	Philippe Blain, Philippe Blain

From: Philippe Blain <levraiphilippeblain@gmail.com>

The '--set-upstream' option to `git fetch` (which is also accepted by
`git pull` and passed through to the underlying `git fetch`) allows
setting the upstream configuration for the current branch. This was
added in 24bc1a1292 (pull, fetch: add --set-upstream option,
2019-08-19).

However, the documentation for that option describes its action as 'If
the remote is fetched successfully, pull and add upstream (tracking)
reference [...]', which is wrong because this option does not cause
neither `git fetch` nor `git pull` to pull: `git fetch` does not pull
and `git pull` always pulls.

Fix the description of that option.

Signed-off-by: Philippe Blain <levraiphilippeblain@gmail.com>
---
    fetch, pull doc: correct description of '--set-upstream'

Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-701%2Fphil-blain%2Ffetch-set-upstream-doc-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-701/phil-blain/fetch-set-upstream-doc-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/701

 Documentation/fetch-options.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/fetch-options.txt b/Documentation/fetch-options.txt
index 6e2a160a47..ff70625694 100644
--- a/Documentation/fetch-options.txt
+++ b/Documentation/fetch-options.txt
@@ -186,7 +186,7 @@ ifndef::git-pull[]
 endif::git-pull[]
 
 --set-upstream::
-	If the remote is fetched successfully, pull and add upstream
+	If the remote is fetched successfully, add upstream
 	(tracking) reference, used by argument-less
 	linkgit:git-pull[1] and other commands. For more information,
 	see `branch.<name>.merge` and `branch.<name>.remote` in

base-commit: 7814e8a05a59c0cf5fb186661d1551c75d1299b5
-- 
gitgitgadget

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

* Re: [PATCH] fetch, pull doc: correct description of '--set-upstream'
  2020-08-12 23:52 [PATCH] fetch, pull doc: correct description of '--set-upstream' Philippe Blain via GitGitGadget
@ 2020-08-13 18:20 ` Junio C Hamano
  0 siblings, 0 replies; 2+ messages in thread
From: Junio C Hamano @ 2020-08-13 18:20 UTC (permalink / raw)
  To: Philippe Blain via GitGitGadget
  Cc: git, Corentin BOMPARD, Nathan BERBEZIER, Pablo CHABANNE,
	Matthieu Moy, Philippe Blain

"Philippe Blain via GitGitGadget" <gitgitgadget@gmail.com> writes:

> --- a/Documentation/fetch-options.txt
> +++ b/Documentation/fetch-options.txt
> @@ -186,7 +186,7 @@ ifndef::git-pull[]
>  endif::git-pull[]
>  
>  --set-upstream::
> -	If the remote is fetched successfully, pull and add upstream
> +	If the remote is fetched successfully, add upstream
>  	(tracking) reference, used by argument-less

Makes sense.  Will queue.  Thanks.

>  	linkgit:git-pull[1] and other commands. For more information,
>  	see `branch.<name>.merge` and `branch.<name>.remote` in
>
> base-commit: 7814e8a05a59c0cf5fb186661d1551c75d1299b5

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

end of thread, other threads:[~2020-08-13 18:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-12 23:52 [PATCH] fetch, pull doc: correct description of '--set-upstream' Philippe Blain via GitGitGadget
2020-08-13 18:20 ` 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).