git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Elijah Newren <newren@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: Mon, 20 Feb 2023 09:20:47 -0800	[thread overview]
Message-ID: <CABPp-BEtXf9ja7Ec1fZ=BZwFDa+50zSAhtm3nN_=k+Nc2c=RXw@mail.gmail.com> (raw)
In-Reply-To: <CAPMMpojCYAwwu6_BE+myFaUy6fLqVSWAyiRWr_dGAmMqqUF12Q@mail.gmail.com>

On Sun, Feb 19, 2023 at 10:01 PM Tao Klerks <tao@klerks.biz> wrote:
>
> On Sat, Feb 18, 2023 at 4:17 AM Elijah Newren <newren@gmail.com> wrote:
> >
> > On Thu, Feb 16, 2023 at 8:02 PM Alex Henrie <alexhenrie24@gmail.com> wrote:
> > >
> > > On Thu, Feb 16, 2023 at 5:31 AM Tao Klerks <tao@klerks.biz> wrote:
> > > >
> > > > If there's an appetite for it, I would love to contribute to a
> > > > multi-year adventure to change git's behavior, little by little, until
> > > > the behavior of "rebase=merges" is the default, and the old behavior
> > > > becomes a different option like
> > > > "rebase=copy-merged-commits-to-flatten"
> > >
> > > I know you had a lot to say in your last email, but I'd like to focus
> > > on this point. I would be OK with the proposed patch if it were part
> > > of a larger effort to make --rebase-merges the default behavior of
> > > `git rebase`. That seems like an achievable goal, and I don't think it
> > > would take multiple years, maybe one year at the most. The process
> > > would look something like this:
> > >
> <SNIP>
> > >
> > > Does that sound reasonable? I think I could lend a hand with steps 1-3.
> >
> > One concern I have is that "--rebase-merges" itself has negative user
> > surprises in store.  In particular, "--rebase-merges", despite its
> > name, does not rebase merges.  It uses the existing author & commit
> > message info, but otherwise just discards the existing merge and
> > creates a new one.  Any information it contained about fixing
> > conflicts, or making adjustments to make the two branches work
> > together, is summarily and silently discarded.
> >
> > My personal opinion would be adding such a capability should be step
> > 2.5 in your list, though I suspect that would make Tao unhappy (it's a
> > non-trivial amount of work, unlike the other steps in your list).
>
> I apologize for my ignorance here, but I'm not sure how this "does not
> rebase merges" concern overlaps with the "pull.rebase" context I'm
> most specifically concerned about.
>
> I would have assumed that when merge commits are "dropped", as results
> from the current "pull.rebase=true" option in the pull conflict
> advice, any merge resolution information is *also* dropped - so there
> is no loss to the user here in advising the use of
> "pull.rebase=merges" instead.
>
> Is your concern about the "pull.rebase=merges" advice change, or more
> about the broader "let's encourage users to more explicitly choose
> between traditional merge-dropping rebase and rebase-merges" change
> Alex is advocating for as a precondition to "my" change :) ?

When we teach new folks about git, and get to rebasing, there is a
simple and easy rule to tell users: don't mix merges and rebases.
(There's a minor exception there in that merges with the upstream
branch are fine and rebasing can let you get rid of those otherwise
ugly-and-frequent back-merges that users sometimes make.)

Obviously, your users are ignoring that advice, and feeling pain.  To
be fair, the "RECOVERING FROM UPSTREAM REBASE" section of the rebase
manual isn't that prominent, and perhaps your users didn't have more
seasoned developers sharing this don't-mix-merges-and-rebases advice
with them.  (It seemed to me to be shared pretty widely and commonly,
but perhaps we are relying on education from others too much and
education is never uniform if not coming from the tool itself.)  I
understand you want to make it easier for users to avoid accidentally
getting into this state.  That's a valid concern and desire.  I think
we should improve the situation.

However, on what timetable and at what cost to others?

You're advocating we start advertising an alternate option, one which
has some caveats and gotchas that are not going to be so easy to
explain to users -- neither to new users, nor to folks who have been
using Git for years.  We could just bite the bullet and start
explaining, but these caveats and gotchas are completely incidental to
the implementation, and are in no-wise fundamental to the desired
operation.  I believe that switching to this new option is going to
generate an awful lot of questions and surprises by users.  It seems
to me to be a really sad state of affairs to be recommending an option
with known defects when (IMO) the solution is known.  Can't we fix it
first, then recommend it?

Granted, this is a trade-off.  You have users experiencing real pain.
You want a solution now.  I want to not recommend features with known
implementation shortcomings and known solutions, until those solutions
are implemented, and I know that will take a while.  What to do here
is a judgement call, and I was merely giving my opinion on the call to
make.  Other folks on the list might see things differently than I do.

  reply	other threads:[~2023-02-20 17:21 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 [this message]
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
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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CABPp-BEtXf9ja7Ec1fZ=BZwFDa+50zSAhtm3nN_=k+Nc2c=RXw@mail.gmail.com' \
    --to=newren@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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).