git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Marc Branchaud <marcnarc@xiplink.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 1/5] fetch doc: update introductory part for clarity
Date: Fri, 30 May 2014 15:13:27 -0400	[thread overview]
Message-ID: <5388D857.7010705@xiplink.com> (raw)
In-Reply-To: <xmqqioon9msf.fsf@gitster.dls.corp.google.com>

On 14-05-30 01:52 PM, Junio C Hamano wrote:
> Marc Branchaud <marcnarc@xiplink.com> writes:
> 
>> On 14-05-29 06:42 PM, Junio C Hamano wrote:
>>> +
>>> +The names of refs that are fetched, together with the object names
>>> +they point at, are written to `.git/FETCH_HEAD`.  This information
>>> +is used by a later merge operation done by 'git merge'.  In addition,
>>
>> Isn't this merge stuff about pull, not fetch?
> 
> It is true that "git pull" uses "git fetch" and .git/FETCH_HEAD is a
> documented mechanism between the two to communicate what commits the
> latter downloaded are to be merged by the former, and that is one of
> the reasons why we had the description here in the original before
> this patch.  A user can also do this to refer to the tip of the
> single branch she fetched:
> 
> 	git fetch origin master
>         git log -p ..FETCH_HEAD
>         git merge FETCH_HEAD
> 
> Perhaps "is used ... by 'git merge'" can be rephrased somehow, like
> "can be used to refer to what was fetched"?  Or we could go in the
> opposite direction and be more explicit, i.e.
> 
> 	"git pull" calls "git fetch" internally, and this
> 	information is used by the former to learn what commits were
> 	fetched by the latter.
> 
> I dunno.

Y'know, I've always been a bit confused by FETCH_HEAD, especially if the
fetch updates several remote-tracking branches.

The docs say that all the fetched refs are written to FETCH_HEAD (perhaps a
more accurate name would have been FETCH_HEADS?).  If that's truly the case,
it seems weird to use FETCH_HEAD in log and merge commands.  (My FETCH_HEAD
file currently has 1434 lines in it -- what does that mean, and what does it
imply for those log and merge commands?)

Perhaps FETCH_HEAD shouldn't be mentioned at all in the introductory part of
fetch's man page.

		M.

  reply	other threads:[~2014-05-30 19:13 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-29 22:42 [PATCH 0/5] Documentation updates for 'git fetch' Junio C Hamano
2014-05-29 22:42 ` [PATCH 1/5] fetch doc: update introductory part for clarity Junio C Hamano
2014-05-30 14:35   ` Marc Branchaud
2014-05-30 17:52     ` Junio C Hamano
2014-05-30 19:13       ` Marc Branchaud [this message]
2014-05-30 21:27         ` Junio C Hamano
2014-06-02 15:21       ` [PATCH] fetch doc: Move FETCH_HEAD material, and add an example Marc Branchaud
2014-06-02 18:24         ` Junio C Hamano
2014-05-29 22:42 ` [PATCH 2/5] fetch doc: update note on '+' in front of the refspec Junio C Hamano
2014-05-30 14:35   ` Marc Branchaud
2014-05-30 17:54     ` Junio C Hamano
2014-06-02 15:37       ` Marc Branchaud
2014-05-29 22:42 ` [PATCH 3/5] fetch doc: remove notes on outdated "mixed layout" Junio C Hamano
2014-05-29 22:42 ` [PATCH 4/5] fetch doc: on pulling multiple refspecs Junio C Hamano
2014-05-29 22:42 ` [PATCH 5/5] fetch doc: update refspec format description 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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5388D857.7010705@xiplink.com \
    --to=marcnarc@xiplink.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).