From: Thomas Rast <trast@student.ethz.ch>
To: Joey Hess <joey@kitenet.net>
Cc: <git@vger.kernel.org>
Subject: Re: [PATCH] fix shell command line in example
Date: Fri, 23 Dec 2011 17:56:48 +0100 [thread overview]
Message-ID: <8739cbi5v3.fsf@thomas.inf.ethz.ch> (raw)
In-Reply-To: <20111223164128.GA21918@gnu.kitenet.net> (Joey Hess's message of "Fri, 23 Dec 2011 12:41:29 -0400")
Joey Hess <joey@kitenet.net> writes:
> The comma was probably intended to be a semicolon so that the
> two commands can be run by cut-n-paste.
[...]
> ------------------------------------------------
> -$ git pull, git pull origin
> +$ git pull; git pull origin
> ------------------------------------------------
Would it ever make sense to run the two in sequence?
But upon closer reading, it seems to be a pretty terrible example
anyway. It reads:
* Update the remote-tracking branches for the repository
you cloned from, then merge one of them into your
current branch:
+
------------------------------------------------
$ git pull, git pull origin
------------------------------------------------
+
Normally the branch merged in is the HEAD of the remote repository,
but the choice is determined by the branch.<name>.remote and
branch.<name>.merge options; see linkgit:git-config[1] for details.
But that "normally" is no longer true: with default configs, the user
would only ever have branches with tracking already set up. So
*normally*, 'git pull' will merge the @{upstream}.
'git pull origin' is even worse: with tracking configured, it goes out
of its way to verify that the specified remote (origin) is actually what
HEAD tracks[*]. So 'git pull origin' with default configs means "please
pull, but double-check me on the choice of remote". Do we want to give
that to a user as the second example?
So I'm thinking it should just read
* Update the upstream origin of the current branch, then merge the
tracked branch into the current one:
+
--------------------------------------------------
$ git pull
--------------------------------------------------
modulo avoiding confusion around upstream/tracking.
[*] a8c9bef (pull: improve advice for unconfigured error case,
2009-10-05) has a long explanation on the subject.
--
Thomas Rast
trast@{inf,student}.ethz.ch
next prev parent reply other threads:[~2011-12-23 16:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-23 16:41 [PATCH] fix shell command line in example Joey Hess
2011-12-23 16:56 ` Thomas Rast [this message]
2011-12-23 17:33 ` Joey Hess
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=8739cbi5v3.fsf@thomas.inf.ethz.ch \
--to=trast@student.ethz.ch \
--cc=git@vger.kernel.org \
--cc=joey@kitenet.net \
/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).