Git development
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Felipe Contreras <felipe.contreras@gmail.com>
Cc: git@vger.kernel.org, Jens Lehmann <Jens.Lehmann@web.de>
Subject: Re: [PATCH 1/3] fetch: add --allow-local option
Date: Fri, 17 May 2013 11:30:30 -0700	[thread overview]
Message-ID: <7vtxm1xxvd.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <CAMP44s0J7vcxno=v9_ewUE6FcuRVuYQhCNVS8D+AvP6cG2XNfQ@mail.gmail.com> (Felipe Contreras's message of "Thu, 16 May 2013 19:04:47 -0500")

Felipe Contreras <felipe.contreras@gmail.com> writes:

> This is irrelevant, it's an implementation detail of 'git pull'. *THE
> USER* is not running 'git fetch .'

To those who fear running "git pull", the following has worked as a
quick way to "preview" what they would be getting.

	git fetch
        git log ..FETCH_HEAD

and then they can "git merge FETCH_HEAD" to conclude it, or run a
"git pull" for real.  We teach the more explicit form to end users
in our tutorial, but it shows the explicit form only because we want
to illustrate what goes on. Over time we added support to "git fetch"
(and "git pull") to make it possible for users to type less when the
remote and branch involved are obvious, but we carefully avoided
breaking this expectation.

So when "the user" is running "git fetch" on "mywork" branch that
happens to be forked from a local "master", i.e. her configuration
is set as

	[branch "mywork"]
        	remote = .
                merge = refs/heads/master

we still need to have FETCH_HEAD updated to point at what we would
be merging if she did a "git pull".  It may be OK to additionally
fetch objects from 'origin' and update the remote tracking branches
associated with 'origin', but anything from 'origin' should not
contaminate what results in FETCH_HEAD---it should record whatever
we record when we did fetch refs/heads/master from '.'.

As I said in the very beginning, it was a mistake for me to suggest
adding a special case behaviour for '.' remote in the first place.
It breaks a long-standing expectation and workflow built around it.

So sorry for wasting our time, and consider this as a misguided
excursion.

  reply	other threads:[~2013-05-17 18:30 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-16  7:31 [PATCH 0/3] fetch: fix '.' fetching Felipe Contreras
2013-05-16  7:31 ` [PATCH 1/3] fetch: add --allow-local option Felipe Contreras
2013-05-16  8:25   ` Ramkumar Ramachandra
2013-05-16  8:53     ` Felipe Contreras
2013-05-16  9:27       ` Ramkumar Ramachandra
2013-05-16  9:34         ` Felipe Contreras
2013-05-16  9:58           ` Ramkumar Ramachandra
2013-05-16 10:27             ` Felipe Contreras
2013-05-16 10:32               ` Ramkumar Ramachandra
2013-05-16 12:54                 ` Felipe Contreras
2013-05-16 15:58   ` Junio C Hamano
2013-05-16 16:26     ` Felipe Contreras
2013-05-16 16:38       ` Junio C Hamano
2013-05-16 16:52         ` Felipe Contreras
2013-05-16 18:04           ` Junio C Hamano
2013-05-16 23:07             ` Felipe Contreras
2013-05-16 23:24               ` Junio C Hamano
2013-05-17  0:04                 ` Felipe Contreras
2013-05-17 18:30                   ` Junio C Hamano [this message]
2013-05-18 12:25                     ` Felipe Contreras
2013-05-19  5:51                       ` Junio C Hamano
2013-05-19  6:10                         ` Felipe Contreras
2013-05-19  7:56                         ` About overzealous compatibility Felipe Contreras
2013-05-19 14:27                           ` Felipe Contreras
2013-05-18 13:12                     ` [PATCH 1/3] fetch: add --allow-local option Philip Oakley
2013-05-18 14:23                       ` Felipe Contreras
2013-05-18 20:53                         ` Philip Oakley
2013-05-18 22:26                           ` Felipe Contreras
2013-05-19  6:10                       ` Junio C Hamano
2013-05-16  7:31 ` [PATCH 2/3] fetch: switch allow-local off by default Felipe Contreras
2013-05-16  7:31 ` [PATCH 3/3] remote: disable allow-local for pushes Felipe Contreras

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=7vtxm1xxvd.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=Jens.Lehmann@web.de \
    --cc=felipe.contreras@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox