* [PATCH] fix shell command line in example
@ 2011-12-23 16:41 Joey Hess
2011-12-23 16:56 ` Thomas Rast
0 siblings, 1 reply; 3+ messages in thread
From: Joey Hess @ 2011-12-23 16:41 UTC (permalink / raw)
To: git
The comma was probably intended to be a semicolon so that the
two commands can be run by cut-n-paste.
Signed-off-by: Joey Hess <joey@kitenet.net>
---
Documentation/git-pull.txt | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Documentation/git-pull.txt b/Documentation/git-pull.txt
index 0f18ec8..628695d 100644
--- a/Documentation/git-pull.txt
+++ b/Documentation/git-pull.txt
@@ -194,7 +194,7 @@ EXAMPLES
current branch:
+
------------------------------------------------
-$ git pull, git pull origin
+$ git pull; git pull origin
------------------------------------------------
+
Normally the branch merged in is the HEAD of the remote repository,
--
1.7.7.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] fix shell command line in example
2011-12-23 16:41 [PATCH] fix shell command line in example Joey Hess
@ 2011-12-23 16:56 ` Thomas Rast
2011-12-23 17:33 ` Joey Hess
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Rast @ 2011-12-23 16:56 UTC (permalink / raw)
To: Joey Hess; +Cc: git
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-12-23 17:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-23 16:41 [PATCH] fix shell command line in example Joey Hess
2011-12-23 16:56 ` Thomas Rast
2011-12-23 17:33 ` Joey Hess
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).