All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Christian Halstrick <christian.halstrick@gmail.com>
Cc: Git <git@vger.kernel.org>
Subject: Re: What is the default refspec for fetch?
Date: Sat, 8 Nov 2014 05:52:21 -0500	[thread overview]
Message-ID: <20141108105221.GA20750@peff.net> (raw)
In-Reply-To: <CAENte7inZ5fm2SzNPq=HNPKnPco9tM4T_es5Dphnpbia-uiLdg@mail.gmail.com>

On Fri, Nov 07, 2014 at 04:31:08PM +0100, Christian Halstrick wrote:

> In a repo where no remote.<name>.fetch config parameter is set what
> should a "git fetch" do? My experiments let me think it's
> "HEAD:FETCH_HEAD". Right?

Basically, yes. We always write FETCH_HEAD, regardless of the refspec.
We choose "HEAD" if no other refspec was provided. So it is really more
like

  git fetch $remote HEAD

This is what makes one-off bare-url pulls work, like:

  git pull git://...

It runs fetch under the hood, which writes into FETCH_HEAD, and then we
merge that.

-Peff

  reply	other threads:[~2014-11-08 10:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-07 15:31 What is the default refspec for fetch? Christian Halstrick
2014-11-08 10:52 ` Jeff King [this message]
2014-11-08 14:35   ` Jakub Narębski
2014-11-09 17:23     ` Junio C Hamano
2014-11-11 23:01       ` Christian Halstrick
2014-11-11 23:04         ` Junio C Hamano

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=20141108105221.GA20750@peff.net \
    --to=peff@peff.net \
    --cc=christian.halstrick@gmail.com \
    --cc=git@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.