public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: ronan@rjp•ie
To: "Chris Torek" <chris.torek@gmail•com>, git@vger•kernel.org
Subject: Re: Git pull without fetch
Date: Sat, 18 Feb 2023 02:02:21 +0000	[thread overview]
Message-ID: <fc7d9fdde0443532eb9c32f26f9f054e@rjp.ie> (raw)
In-Reply-To: <CAPx1Gvd8vizeyveKgE2o2GStQsiGxN4aaASqYc81Nk28ogFLJg@mail.gmail.com>

February 17, 2023 6:46 PM, "Chris Torek" <chris.torek@gmail•com> wrote:

> `git pull` = `git fetch` followed by a second command, either `git merge` or `git rebase`. If you
> don't want the `git fetch` step, run the *second* command, instead of running *both* commands: it's
> really just that simple.

No it isn't. Sorry, but I think you have misunderstood the problem. I'm well
aware of the behavior of git pull.

In the scenario described, `git rebase` will always report "Already up to date"
because the head of the current branch and the head of the remote tracking
branch are the same. The prefetched reference lives under refs/prefetch/* and is
unnoticed by git rebase. This is why I used `git update-ref ...` first: to
update the remote tracking branch from the prefetched copy.

  parent reply	other threads:[~2023-02-18  2:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-18  0:09 Git pull without fetch ronan
     [not found] ` <CAPx1Gvd8vizeyveKgE2o2GStQsiGxN4aaASqYc81Nk28ogFLJg@mail.gmail.com>
2023-02-18  2:02   ` ronan [this message]
2023-02-18  2:46     ` Junio C Hamano
2023-02-18  4:33       ` ronan

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=fc7d9fdde0443532eb9c32f26f9f054e@rjp.ie \
    --to=ronan@rjp$(echo .)ie \
    --cc=chris.torek@gmail$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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