From: "Jakub Narębski" <jnareb@gmail.com>
To: Jeff King <peff@peff.net>,
Christian Halstrick <christian.halstrick@gmail.com>
Cc: Git <git@vger.kernel.org>
Subject: Re: What is the default refspec for fetch?
Date: Sat, 08 Nov 2014 15:35:25 +0100 [thread overview]
Message-ID: <545E2A2D.2040205@gmail.com> (raw)
In-Reply-To: <20141108105221.GA20750@peff.net>
W dniu 2014-11-08 11:52, Jeff King pisze:
> 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.
Actually FETCH_HEAD consists of multiple lines, one per ref...
but only top ref is merged.
--
Jakub Narębski
next prev parent reply other threads:[~2014-11-08 14:35 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
2014-11-08 14:35 ` Jakub Narębski [this message]
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=545E2A2D.2040205@gmail.com \
--to=jnareb@gmail.com \
--cc=christian.halstrick@gmail.com \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
/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).