git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jay Soffian <jaysoffian@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: FETCH_HEAD question
Date: Mon, 16 Feb 2009 23:18:59 -0800	[thread overview]
Message-ID: <7vr61x8ra4.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <76718490902162221i31e02052j48c9f620a2d47985@mail.gmail.com> (Jay Soffian's message of "Tue, 17 Feb 2009 01:21:00 -0500")

Jay Soffian <jaysoffian@gmail.com> writes:

> On Tue, Feb 17, 2009 at 12:36 AM, Junio C Hamano <gitster@pobox.com> wrote:
>> [... explanation of how git pull and git fetch communicate via FETCH_HEAD...]
>
> I'm aware of all that, and I apologize for not making that clear,
> since I made you do lots of extra typing. :-(

Your "git merge FETCH_HEAD" after fetching random set of refs by the
default wildcard refspec in .git/config made me suspect you aren't.

>>        $ git fetch git://repo.or.cz/his.git for-linus
>>        $ git log -p ..FETCH_HEAD ;# to inspect
>>        $ git merge FETCH_HEAD
>> ...
> That makes sense, but I was confused why git merge goes through the
> trouble of stripping out the not-for-merge tag which in the above use
> case wouldn't be there.

Because it is designed to handle a lot more general case of fetching all
remote branches into your remote tracking branches with wildcard refspecs,
and most of the entries need to be marked with not-for-merge marker.  If
you left only the for-merge branches, you would not have any sane way to
learn what refs were fetched after you said "git fetch" (and no, looking
at timestamp of files in .git/refs/remotes/origin/ is not a sensible
answer).

  reply	other threads:[~2009-02-17  7:23 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-17  4:43 FETCH_HEAD question Jay Soffian
2009-02-17  5:11 ` Jay Soffian
2009-02-17  5:36 ` Junio C Hamano
2009-02-17  6:21   ` Jay Soffian
2009-02-17  7:18     ` Junio C Hamano [this message]
2009-02-17  7:41       ` Jay Soffian
2009-02-17  8:35         ` Junio C Hamano
2009-02-17 17:14           ` Jay Soffian
2009-02-17 17:22             ` Johannes Schindelin
2009-02-17 17:34               ` Jay Soffian
2009-02-17 22:58                 ` PUSH_HEAD, was " Johannes Schindelin
2009-02-17 23:43                   ` Junio C Hamano
2009-02-18  0:29                     ` Jay Soffian
2009-02-18  0:30                     ` Johannes Schindelin
2009-02-17  8:25     ` Sitaram Chamarty

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=7vr61x8ra4.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=jaysoffian@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).