From: "Vít Ondruch" <vondruch@redhat.com>
To: Felipe Contreras <felipe.contreras@gmail.com>, Jeff King <peff@peff.net>
Cc: Junio C Hamano <gitster@pobox.com>,
"Theodore Y. Ts'o" <tytso@mit.edu>,
Alex Henrie <alexhenrie24@gmail.com>,
Git mailing list <git@vger.kernel.org>
Subject: Re: Pick the right default and stop warn on `git pull`
Date: Tue, 24 Nov 2020 11:35:03 +0100 [thread overview]
Message-ID: <ab50a108-0df0-e9b6-1d96-f929c513a5b9@redhat.com> (raw)
In-Reply-To: <CAMP44s08mEyYqbjOeTeS46CngrbQMqP2=cMr1dtRLLk_BLAq3w@mail.gmail.com>
[-- Attachment #1.1.1: Type: text/plain, Size: 2052 bytes --]
Dne 24. 11. 20 v 4:41 Felipe Contreras napsal(a):
> On Mon, Nov 23, 2020 at 8:32 PM Jeff King <peff@peff.net> wrote:
>> On Mon, Nov 23, 2020 at 06:18:40PM -0800, Junio C Hamano wrote:
>>> So an obvious thing we could do, if pull.mode is too much of a
>>> change, is to make "pull --rebase" codepath honor pull.ff as well,
>>> perhaps? I.e. those who set pull.ff=only are saying that "please
>>> stop me when I have any local change---I want to be notified if my
>>> pull on this branch results in anything but a fast-forward from the
>>> upstream".
>>>
>>> And then making an unconfigured pull.ff to default to pull.ff=only
>>> may give a proper failure whether you merge or rebase. I dunno.
>> Yeah, I would be perfectly happy with that (and it's in fact what I
>> _thought_ was happening before today's discussion).
>>
>> I do wonder if anybody has set:
>>
>> pull.rebase=true
>> pull.ff=only
>>
>> which would then refuse to rebase at all, and whether they would be
>> annoyed. I am scratching my head over why one would do that, though. It
>> is meaningful only if you usually rebase, but when you say "--no-rebase"
>> you want to make sure you do not create a merge commit. Which seems
>> weird.
> I think you are losing track of the goal.
>
> The goal is that *eventually*:
>
> 1. No warning is issued
> 2. No configuration is needed
> 3. The default behavior is sane.
>
> The whole point of "pull.rebase=ff-only" (aka. "pull.mode=ff-only")
> was to make it the *default*.
>
> If you make "pull.ff=only" the default, *and* you make "git pull
> --rebase" respect that, then "git pull --rebase" will fail by default
> (unless it's a fast-forward).
>
> What we really need is something like:
>
> 1. git pull # fail by default unless it's a fast-forward
> 2. git pull --merge # force a merge (unless it's a fast-forward,
> depending on pull.ff)
> 3. git pull --rebase # force a rebase (unless it's a fast-forward,
> depending on pull.ff)
This is the default I would expect.
Vít
[-- Attachment #1.1.2: OpenPGP_0x0CE09EE79917B87C.asc --]
[-- Type: application/pgp-keys, Size: 61897 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]
next prev parent reply other threads:[~2020-11-24 10:35 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-23 15:13 Pick the right default and stop warn on `git pull` Vít Ondruch
2020-11-23 17:59 ` Alex Henrie
2020-11-23 19:13 ` Theodore Y. Ts'o
2020-11-23 19:40 ` Felipe Contreras
2020-11-23 20:20 ` Theodore Y. Ts'o
2020-11-23 20:34 ` Felipe Contreras
2020-11-23 21:48 ` Jeff King
2020-11-23 22:03 ` Alex Henrie
2020-11-24 0:37 ` Jeff King
2020-11-23 22:39 ` Junio C Hamano
2020-11-23 22:55 ` Felipe Contreras
2020-11-24 0:39 ` Jeff King
2020-11-24 0:57 ` Felipe Contreras
2020-11-24 1:23 ` Jeff King
2020-11-24 2:18 ` Junio C Hamano
2020-11-24 2:32 ` Jeff King
2020-11-24 3:41 ` Felipe Contreras
2020-11-24 7:19 ` Jeff King
2020-11-24 7:48 ` Felipe Contreras
2020-11-24 8:07 ` Jeff King
2020-11-24 10:35 ` Vít Ondruch [this message]
2020-11-24 20:21 ` Alex Henrie
2020-11-24 22:11 ` Felipe Contreras
2020-11-24 23:23 ` Alex Henrie
2020-11-25 0:39 ` Junio C Hamano
2020-11-26 1:02 ` Felipe Contreras
2020-11-23 19:12 ` Junio C Hamano
2020-11-23 19:37 ` Felipe Contreras
2020-11-23 19:43 ` 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=ab50a108-0df0-e9b6-1d96-f929c513a5b9@redhat.com \
--to=vondruch@redhat.com \
--cc=alexhenrie24@gmail.com \
--cc=felipe.contreras@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=peff@peff.net \
--cc=tytso@mit.edu \
/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).