Git-pull Documentation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux