From: Thomas Rast <trast@student.ethz.ch>
To: <git@vger.kernel.org>
Cc: Zing <zing@fastmail.fm>,
"Björn Gustavsson" <bgustavsson@gmail.com>,
"Junio C Hamano" <gitster@pobox.com>
Subject: [PATCH] Documentation: do not advertise --all in git-pull(1)
Date: Thu, 7 Jan 2010 17:09:33 +0100 [thread overview]
Message-ID: <a6112d286c5deeb4cc2ccfb1a90ff384440c1341.1262880109.git.trast@student.ethz.ch> (raw)
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:
> 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 parent reply other threads:[~2010-01-07 16:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <hi2mu8ob@ger.gmane.org>
2010-01-07 16:09 ` Thomas Rast [this message]
2010-01-07 18:25 ` [PATCH] Documentation: do not advertise --all in git-pull(1) Zing
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a6112d286c5deeb4cc2ccfb1a90ff384440c1341.1262880109.git.trast@student.ethz.ch \
--to=trast@student.ethz.ch \
--cc=bgustavsson@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=zing@fastmail.fm \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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 NNTP newsgroup(s).