From: Felipe Contreras <felipe.contreras@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: "Alex Henrie" <alexhenrie24@gmail.com>,
"Jeff King" <peff@peff.net>, "Theodore Y. Ts'o" <tytso@mit.edu>,
"Vít Ondruch" <vondruch@redhat.com>,
"Git mailing list" <git@vger.kernel.org>
Subject: Re: Pick the right default and stop warn on `git pull`
Date: Wed, 25 Nov 2020 19:02:14 -0600 [thread overview]
Message-ID: <CAMP44s0M00sBvdjD0jc0X=1=PJepC5fNndw73sceOpbDCw5dFQ@mail.gmail.com> (raw)
In-Reply-To: <xmqq7dqagtgx.fsf@gitster.c.googlers.com>
On Tue, Nov 24, 2020 at 6:39 PM Junio C Hamano <gitster@pobox.com> wrote:
>
> Alex Henrie <alexhenrie24@gmail.com> writes:
>
> > We'd only need a warning if both pull.ff and pull.rebase are unset,
> > since that's the only situation where the behavior would change. And
> > providentially, we already have a warning in that exact case, although
> > we should probably tweak it to explain what the new behavior is going
> > to be :-)
>
> If we were starting "git pull" from scratch without any existing
> configuration and command line options, pull.mode might present a
> simpler end user experience, but I have to say that pull.ff and
> pull.rebase that are fairly well ingrained in docs and users' minds,
> the above plan sounds like a better option to reduce the cognitive
> overhead for users.
Is it? From forums, blogs, and answers in Stack Overflow what I mostly
see is "do not do git pull".
> >> And yes, it should be possible to do what you suggest, but have you
> >> tried? I suspect both the code and the documentation would be quite
> >> convoluted.
> >
> > Yes, I have written a very simple patch that implements the behavior
> > that I am suggesting. I will send it to the mailing list later
> > tonight.
>
> Let's see how well the comparison between two approaches play out.
> Thanks.
I tried to remove pull.mode from my patch series, and it mostly works,
except if you:
1. Have "pull.ff=only"
2. Do a "git pull --no-rebase"
When you have "pull.mode=ff-only", doing "git pull --no-rebase" ("git
pull --merge") that mode is overridden, and the merge succeeds.
If you have "pull.ff=only", you would have to do "git pull --no-rebase
--no-ff" for the merge to succeed, which I don't think should be the
default.
We could change the semantics of "pull.ff=only", but that would break
existing behavior, and it starts to get convoluted.
Cheers.
--
Felipe Contreras
next prev parent reply other threads:[~2020-11-26 1:02 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
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 [this message]
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='CAMP44s0M00sBvdjD0jc0X=1=PJepC5fNndw73sceOpbDCw5dFQ@mail.gmail.com' \
--to=felipe.contreras@gmail.com \
--cc=alexhenrie24@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=peff@peff.net \
--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).