git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Alex Henrie <alexhenrie24@gmail.com>,
	Felipe Contreras <felipe.contreras@gmail.com>
Cc: Git <git@vger.kernel.org>, "Raymond E. Pasco" <ray@ameretat.dev>,
	"Jeff King" <peff@peff.net>, "Vít Ondruch" <vondruch@redhat.com>,
	"Theodore Tso" <tytso@mit.edu>
Subject: Re: [RFC 2/2] pull: default pull.ff to "only" when pull.rebase is not set either
Date: Thu, 03 Dec 2020 18:06:07 -0800	[thread overview]
Message-ID: <xmqqpn3qfhps.fsf@gitster.c.googlers.com> (raw)
In-Reply-To: <xmqqmtyuhemi.fsf@gitster.c.googlers.com> (Junio C. Hamano's message of "Thu, 03 Dec 2020 11:29:57 -0800")

Junio C Hamano <gitster@pobox.com> writes:

> Junio C Hamano <gitster@pobox.com> writes:
>
>>> That would require changing the semantics of --ff-only, so that "git
>>> pull --no-rebase --ff-only" doesn't make sense (as --ff-only is
>>> overridden by --no-rebase).
>>
>> I do not think such a conclusion follows from "we do not want to use
>> the 'by default force the --ff-only' when the user chooses between
>> merge and rebase".  Specifically, I do not agree with "as --ff-only
>> is overridden" in your statement.
>
> Ah, sorry, I mis-read your three lines above.
> ...
> And if we introduce a third-way, i.e. "we do not handle the case
> where you have your own development at all, this is only to maintain
> pristine copy from your upstream", and repurpose "--ff-only" for
> that purpose, yes, what you said above does make sense.  At that
> point, there is no reason to disagree with "as --ff-only is
> overridden" part of your statement---in your new world, "--ff-only"
> is redesigned to act that way.

Just to avoid misunderstanding, I only meant to say that the first
three lines I quoted is internally consistent (unlike the message I
was responding to, in which I said "I disagree---the conclusion does
not follow").  It no way means I think such a re-definition of what
"--ff-only" means is a great design.

What we want to see can be done without such backward incompatible
changes, e.g. declaring the combination of "--ff-only" and
"--[no-]rebase" incompatible and/or the last one wins, I would say,
and I suspect Alex's RFC was an attempt to make the first step in
that direction.

What is most missing in the current system is a fix for the way in
which "--rebase" interacts with "--ff-only".  Immediately after
fetching, if our current branch is not a subset of what we fetched
from the other side, the command should die.  Otherwise, it should
just rebase what we have (which is nothing) on top of the tip of the
history of the other side (which is to fast-forward our tip and the
working tree to their tip).  

Another thing we would want to change is to make the "you must
choose between rebase and merge" trigger a lot more lazily.  If our
side does not have our own development and their history is a
descendent of what we have, the user shouldn't have to choose.  Only
when the history they have does not fast-forward, we have to abort
giving the "you must choose between the two" warning message.

When the user tells us to do rebase or merge, nothing (except that
"--ff-only" should prevent the rebase from going forward) should
have to be changed.

  parent reply	other threads:[~2020-12-04  2:06 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-25  2:09 [RFC 1/2] pull: warn that pulling will not merge by default in Git 3.0 Alex Henrie
2020-11-25  2:09 ` [RFC 2/2] pull: default pull.ff to "only" when pull.rebase is not set either Alex Henrie
2020-11-25  3:45   ` Felipe Contreras
2020-11-25  3:47     ` Felipe Contreras
2020-11-25 13:25       ` Philip Oakley
2020-12-02  4:43         ` Felipe Contreras
2020-12-03  2:21   ` Junio C Hamano
2020-12-03  9:07     ` Felipe Contreras
2020-12-03 18:06       ` Junio C Hamano
2020-12-03 19:29         ` Junio C Hamano
2020-12-03 23:05           ` Felipe Contreras
2020-12-04  0:53             ` Jacob Keller
2020-12-04  2:06           ` Junio C Hamano [this message]
2020-12-04  6:37             ` Felipe Contreras
2020-12-04 19:37               ` Junio C Hamano
2020-12-04 21:11                 ` Felipe Contreras
2020-12-11 20:38     ` Alex Henrie
2020-12-12  1:08       ` 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=xmqqpn3qfhps.fsf@gitster.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=alexhenrie24@gmail.com \
    --cc=felipe.contreras@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    --cc=ray@ameretat.dev \
    --cc=tytso@mit.edu \
    --cc=vondruch@redhat.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).