git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felipe Contreras <felipe.contreras@gmail.com>
To: Tao Klerks <tao@klerks.biz>
Cc: Alex Henrie <alexhenrie24@gmail.com>,
	Tao Klerks via GitGitGadget <gitgitgadget@gmail.com>,
	git@vger.kernel.org,
	Johannes Schindelin <Johannes.Schindelin@gmx.de>
Subject: Re: [PATCH] pull: conflict hint pull.rebase suggestion should offer "merges" vs "true"
Date: Tue, 28 Feb 2023 08:13:14 -0600	[thread overview]
Message-ID: <CAMP44s1_Oy8GzoALnvQMJEVRkDB3EBmn4drTyY6T+9BatRpjUA@mail.gmail.com> (raw)
In-Reply-To: <CAPMMpogFAR6cvcR8T5fx+AoytAJ7TsPpSeOjHNzW4Gmkuq7FLQ@mail.gmail.com>

On Thu, Feb 16, 2023 at 7:33 AM Tao Klerks <tao@klerks.biz> wrote:
> On Thu, Feb 16, 2023 at 4:22 AM Alex Henrie <alexhenrie24@gmail.com> wrote:

> > Now, this is not to say that there's no room for improvement. I like
> > the rebase=merges option and I wish everyone knew about it because
> > there are situations where it really is the best option. I suggest
> > leaving the existing text alone, but adding an additional paragraph,
> > something like:
> >
> > Note that --rebase or pull.rebase=true will drop existing merge
> > commits and rebase all of the commits from all of the merged branches.
> > If you want to rebase but preserve existing merge commits, use
> > --rebase=merges or pull.rebase=merges instead.
>
> My primary motivation with this pull request is to reduce the
> incidences, out there in the world, of people copy-pasting "git config
> pull.rebase true" into their command-line, and causing themselves
> major headaches days or weeks later. The "--rebase=interactive" part
> is secondary (to my concerns), because it's much less copy-pastable.

That's because the whole approach to the pull.rebase configuration is
wrong. I explained why multiple times in countless discussions and git
developers did not listen.

What we need is a pull.mode configuration that is *orthogonal* to
pull.rebase, then everything just works.

For example, you could have this configuration.

    git config pull.mode merge
    git config pull.rebase merges

Then doing `git pull --rebase` would do a merges rebase.

This is not possible with the current approach, which I objected to.

Then there's no problem with telling the users to do pull.mode=rebase
(or whatever), since that doesn't override pull.rebase=merges.

I programmed and explained this precise interaction with rebase=merges
more than two years ago [1], but nobody listened. For an example of
how such configuration would look like, see the patches I just sent
[2].

Cheers.

[1] https://lore.kernel.org/git/20201218211026.1937168-14-felipe.contreras@gmail.com/
[2] https://lore.kernel.org/git/20230228140236.4175835-1-felipe.contreras@gmail.com/T/#t

-- 
Felipe Contreras

  parent reply	other threads:[~2023-02-28 14:13 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-05 16:24 [PATCH] pull: conflict hint pull.rebase suggestion should offer "merges" vs "true" Tao Klerks via GitGitGadget
2023-02-16  3:22 ` Alex Henrie
2023-02-16 12:31   ` Tao Klerks
2023-02-17  3:15     ` Alex Henrie
2023-02-17 11:15       ` Tao Klerks
2023-02-17 18:56         ` Alex Henrie
2023-02-17 17:39       ` Junio C Hamano
2023-02-18  3:17       ` Elijah Newren
2023-02-18 16:39         ` Phillip Wood
2023-02-20  8:03           ` Tao Klerks
2023-02-20 16:45             ` Phillip Wood
2023-02-20 16:56             ` Elijah Newren
2023-02-21 14:04               ` Tao Klerks
2023-02-22 14:27             ` Sergey Organov
2023-02-24  7:06               ` Elijah Newren
2023-02-24 22:06                 ` Sergey Organov
2023-02-24 23:59                   ` Elijah Newren
2023-02-25 15:15                     ` Sergey Organov
2023-02-25 16:28                       ` Elijah Newren
2023-02-26  9:29                         ` Sergey Organov
2023-02-27 15:20                           ` Elijah Newren
2023-02-27 17:17                             ` Sergey Organov
2023-02-28  2:35                               ` Elijah Newren
2023-02-20 16:46           ` Elijah Newren
2023-02-20  6:01         ` Tao Klerks
2023-02-20 17:20           ` Elijah Newren
2023-02-20 18:33             ` Alex Henrie
2023-02-21 15:40               ` Tao Klerks
2023-02-21 17:45                 ` Alex Henrie
2023-02-21 15:01             ` Tao Klerks
2023-02-24  7:06               ` Elijah Newren
2023-02-28 14:13     ` Felipe Contreras [this message]
2023-02-28 20:04       ` Alex Henrie
2023-03-01 12:46         ` 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=CAMP44s1_Oy8GzoALnvQMJEVRkDB3EBmn4drTyY6T+9BatRpjUA@mail.gmail.com \
    --to=felipe.contreras@gmail.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=alexhenrie24@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=tao@klerks.biz \
    /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).