[PATCH] Documentation: do not advertise --all in git-pull(1)
From: Thomas Rast <hidden>
Date: 2016-06-15 22:47:58
Subsystem:
documentation, the rest · Maintainers:
Jonathan Corbet, Linus Torvalds
Since 9c4a036 (Teach the --all option to 'git fetch', 2009-11-09), we document git-fetch's option --all in fetch-options.txt. However, that file is also included by git-pull.txt, where the option makes no sense. Wrap the option with ifdef so that it does not appear on the git-pull manpage. Signed-off-by: Thomas Rast <redacted> --- Zing [off-list ref] wrote:
In 1.6.6, if I do: $ git pull --all Fetching origin Fetching gnome You asked to pull from the remote '--all', but did not specify a branch. Because this is not the default configured remote for your current branch, you must specify a branch on the command line.
This one fixes the documentation problem, but I think there's a deeper misunderstanding. What did you hope to do with 'git pull --all'? I suspect most people on this list would take it to mean "fetch all branches from all remotes, and merge them into HEAD". I cannot imagine a use-case where that would make any sense. (And it wouldn't work, because the current implementation of 'git fetch --all' leaves only the last remote's branches in FETCH_HEAD.)
From earlier discussions on the non-intuitiveness of git-pull, I kind
of suspect you wanted to fetch all remotes, and then "update" all local branches that track some remote with their corresponding remote-tracking branches. In which case the question is: why do you use local branches if you have them "blindly" track the upstream? Documentation/fetch-options.txt | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/Documentation/fetch-options.txt b/Documentation/fetch-options.txt
index ab6419f..6271615 100644
--- a/Documentation/fetch-options.txt
+++ b/Documentation/fetch-options.txt@@ -1,5 +1,7 @@ +ifndef::git-pull[] --all:: Fetch all remotes. +endif::git-pull[] -a:: --append::
--
1.6.6.202.gdf32a