git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Git-pull Documentation
@ 2019-02-13 18:13 Maris Razvan
  2019-02-13 22:43 ` Junio C Hamano
  0 siblings, 1 reply; 2+ messages in thread
From: Maris Razvan @ 2019-02-13 18:13 UTC (permalink / raw)
  To: git

Hello,

In the "EXAMPLES" section of the git-pull documentation
(https://git-scm.com/docs/git-pull#_examples) there is the following:

    "[...] Merge into the current branch the remote branch next:

    $ git pull origin next

    This leaves a copy of next temporarily in FETCH_HEAD, but does not
update any remote-
    tracking branches. [...]"

However, the second bullet-point in the "CONFIGURED REMOTE-TRACKING
BRANCHES" section of the git-fetch documentation
(https://git-scm.com/docs/git-fetch#_configured_remote_tracking_branches_a_id_crtb_a)
states that it is possible for a command of the form "git fetch
<remote> <branch>" to update a remote-tracking branch.

I checked and the current behaviour of "git pull <remote> <branch>" is
to update the remote-tracking branch if required, because, as I have
seen in the code, it just calls "git fetch".

I believe that the quoted example from the git-pull documentation is wrong.

Also, in the beginning of the git-pull documentation there is the
following paragraph:

    "Default values for <repository> and <branch> are read from the
"remote" and "merge"
    configuration for the current branch as set by git-branch[1] --track."

I believe that this paragraph tries to state that if the <remote> and
the <refspec> arguments are missing, they are replaced with
branch.<name>.remote and branch.<name>.merge, respectively. However I
think that this paragraph is unnecessary (and partially wrong), as the
behaviour of git-pull when no arguments are given is described in the
"DEFAULT BEHAVIOUR" section
(https://git-scm.com/docs/git-pull#_default_behaviour) and it is a
little more complicated than that, as one set of branches are used for
fetching (e.g. the values of remote.<origin>.fetch) and another set of
branches are used for merging (e.g. the value of branch.<name>.merge).


I hope I did not miss anything.


Thank you,
Razvan Maris

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-02-13 22:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-13 18:13 Git-pull Documentation Maris Razvan
2019-02-13 22:43 ` Junio C Hamano

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).