git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Maris Razvan <razvan.alex.maris@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Git-pull Documentation
Date: Wed, 13 Feb 2019 14:43:31 -0800	[thread overview]
Message-ID: <xmqqsgwr9ung.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <CALZbgSSzpd7bDWE1iyfqAsv9oovsSK22oReDiPGG-Td5D2qgaA@mail.gmail.com> (Maris Razvan's message of "Wed, 13 Feb 2019 20:13:09 +0200")

Maris Razvan <razvan.alex.maris@gmail.com> writes:

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

The thing is, "git fetch origin next" did *NOT* update remote-tracking
branch refs/remotes/origin/next for a long time, until f2690487
("fetch: opportunistically update tracking refs", 2013-05-11)
happend.

The series did not update the documentation all that much, which was
why you are seeing neither "git fetch" nor "git pull" documented to
perform this "opportunistic update of tracking refs".  The only
change the topic with f2690487 brought in to the Documentation was
the attached bit.

Documentation updates to both pull and fetch are very much welcomed.

Thanks.

$ git diff --stat -p 67b57a90f4 db400949b31a Documentation/
 Documentation/pull-fetch-param.txt | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/Documentation/pull-fetch-param.txt b/Documentation/pull-fetch-param.txt
index 94a9d32f1d..18cffc25b8 100644
--- a/Documentation/pull-fetch-param.txt
+++ b/Documentation/pull-fetch-param.txt
@@ -68,6 +68,11 @@ Some short-cut notations are also supported.
 +
 * `tag <tag>` means the same as `refs/tags/<tag>:refs/tags/<tag>`;
   it requests fetching everything up to the given tag.
-* A parameter <ref> without a colon is equivalent to
-  <ref>: when pulling/fetching, so it merges <ref> into the current
-  branch without storing the remote branch anywhere locally
+ifndef::git-pull[]
+* A parameter <ref> without a colon fetches that ref into FETCH_HEAD,
+endif::git-pull[]
+ifdef::git-pull[]
+* A parameter <ref> without a colon merges <ref> into the current
+  branch,
+endif::git-pull[]
+  and updates the remote-tracking branches (if any).




      reply	other threads:[~2019-02-13 22:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-13 18:13 Git-pull Documentation Maris Razvan
2019-02-13 22:43 ` Junio C Hamano [this message]

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=xmqqsgwr9ung.fsf@gitster-ct.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=razvan.alex.maris@gmail.com \
    /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).