git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Documentation: do not advertise --all in git-pull(1)

From
Thomas Rast <trast@student.ethz.ch>
Date
Jan 7, 2010, 16:09 UTC
Message-ID
<a6112d286c5deeb4cc2ccfb1a90ff384440c1341.1262880109.git.trast@student.ethz.ch>
In-Reply-To
<hi2mu8ob@ger.gmane.org>

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 <trast@student.ethz.ch>
---
Zing <zing@fastmail.fm> wrote:
Show 8 quoted lines
> 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
Next: Zing
Message 1 of 2 in “Documentation: do not advertise --all in git-pull(1)”
  1. Documentation: do not advertise --all in git-pull(1)Thomas Rast, Jan 7, 2010
  2. ZingJan 7, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.