git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Denton Liu <liu.denton@gmail.com>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: phillip.wood@dunelm.org.uk,
	"Philippe Blain" <levraiphilippeblain@gmail.com>,
	"Git mailing list" <git@vger.kernel.org>,
	"Eric Sunshine" <sunshine@sunshineco.com>,
	"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
	"Jonathan Tan" <jonathantanmy@google.com>,
	"Elijah Newren" <newren@gmail.com>
Subject: Re: [RFC] should `git rebase --keep-base` imply `--reapply-cherry-picks` ?
Date: Tue, 14 Jul 2020 23:20:14 -0400	[thread overview]
Message-ID: <20200715032014.GA10818@generichostname> (raw)
In-Reply-To: <nycvar.QRO.7.76.6.2007142236060.52@tvgsbejvaqbjf.bet>

Hi all,

On Tue, Jul 14, 2020 at 10:38:23PM +0200, Johannes Schindelin wrote:
> > To me the question is why are we looking at the upstream commits at all
> > with `--keep-base`? I had expected `rebase --keep-base` to be the same
> > as `rebase $(git merge-base [--fork-point] @{upstream} HEAD)` but
> > looking at the code it seems to be `rebase --onto $(git merge-base
> > @{upstream} HEAD) @{upstream}`. I didn't really follow the development
> > of this feature - is there a reason we don't just use the merge-base as
> > the upstream commit?

It behaves this way mostly for unimportant reasons. The first is that my
workflow before implementing this feature invoked running
`git rebase --onto master... master` and I wanted to replicate that.

More importantly, one feature of using the upstream I considered is
documented in t3431. Essentially, if we have the following graph,

	A---B---D---E    (master)
	     \
	      C*---F---G (side)
	
	C was formerly part of master but master was rewound to remove C

running `git rebase --keep-base --fork-point master` would drop C.

> Those are interesting questions, indeed.
> 
> And I dare to suspect that the answer is indeed: `--keep-base` really
> should not only substitute `onto` but also `upstream` with the merge base.

I would be open to changing the behaviour since the commit dropping
isn't really a feature that I use very often. However, I am worried
about pulling the rug out from other people if they use it since this is
a documented feature in git-rebase.txt.

Thanks,
Denton

> Ciao,
> Dscho

  reply	other threads:[~2020-07-15  3:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-14  2:44 [RFC] should `git rebase --keep-base` imply `--reapply-cherry-picks` ? Philippe Blain
2020-07-14  3:10 ` Denton Liu
2020-07-14  3:51   ` Jonathan Tan
2020-07-15  3:32     ` Denton Liu
2020-07-14  9:52   ` Phillip Wood
2020-07-14 20:38     ` Johannes Schindelin
2020-07-15  3:20       ` Denton Liu [this message]
2020-07-15  8:53         ` Phillip Wood

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=20200715032014.GA10818@generichostname \
    --to=liu.denton@gmail.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=jonathantanmy@google.com \
    --cc=levraiphilippeblain@gmail.com \
    --cc=newren@gmail.com \
    --cc=phillip.wood@dunelm.org.uk \
    --cc=sunshine@sunshineco.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).