Skip to contentSkip to conversation

fetch, pull doc: correct description of '--set-upstream'

PATCH In review Philippe Blain via GitGitGadget 2 participants 2 messages Aug 12, 2020 – Aug 13, 2020 Documentation

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fetch, pull doc: correct description of '--set-upstream'

From: Philippe Blain <[email protected]>

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.

---
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(-)
Documentation/fetch-options.txt +1 -1
index 6e2a160a47..ff70625694 100644
@@ -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

Signature · 1 line
gitgitgadget
#1 lore raw

Documentation/fetch-options.txt ifndef::git-pull[] · line 190

Quoted 9 lines · Philippe Blain via GitGitGadget
Documentation/fetch-options.txt +1 -1
@@ -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.

Quoted 4 lines
Documentation/fetch-options.txt +0 -0
 	linkgit:git-pull[1] and other commands. For more information,
 	see `branch.<name>.merge` and `branch.<name>.remote` in

base-commit: 7814e8a05a59c0cf5fb186661d1551c75d1299b5