From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: George Spelvin <lkml@SDF.ORG>
Cc: Junio C Hamano <gitster@pobox.com>,
git@vger.kernel.org, Philip Oakley <philipoakley@iee.email>
Subject: Re: Feature request: rebase -i inside of rebase -i
Date: Sat, 4 Apr 2020 14:17:17 +0200 (CEST) [thread overview]
Message-ID: <nycvar.QRO.7.76.6.2004041414370.46@tvgsbejvaqbjf.bet> (raw)
In-Reply-To: <20200331000018.GD9199@SDF.ORG>
Hi George,
On Tue, 31 Mar 2020, George Spelvin wrote:
> Thinking about Philip Oakley's suggestion, it dawned on me that
> we can *already* do a nested rebase manually, and having a less
> manual alias for the procedure would be reasonable.
>
> Suppose the last four commits are O-A-B-C, and whether they were created
> by this rebase or existed before is irrelevant.
>
> If I want to rebase --nested -i O, then I --edit-todo and
> prepend the following four lines:
> reset O
> pick A
> pick B
> pick C
>
> If a nested rebase command does just that, I think it would cover my
> use case. If it adds a comment saying "nested rebase ends here",
> it's easy to cancel the nested rebase if there was a mistake.
FWIW this is precisely what I do in
https://github.com/git-for-windows/build-extra/blob/70d940d1b/ever-green.sh#L184-L246
I create a new worktree (without checking out anything), start a rebase
with a custom (fake) editor that simply grabs the todo list and aborts
that rebase. Then I remove that worktree and insert the grabbed todo list
into the current one.
However, I find that it is not at all easy to cancel the nested rebase
because the current `HEAD` is recorded _nowhere_.
Ciao,
Dscho
> A slightly fancier thing a nestrd rebase could do is see if any of the
> newly created picks are also used in merges that were already in the todo
> list. In that case, follow the pick by a label command and update the
> later merge to refer to the label.
>
next prev parent reply other threads:[~2020-04-04 12:17 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-20 22:30 Feature request: rebase -i inside of rebase -i George Spelvin
2020-03-20 22:51 ` Junio C Hamano
2020-03-20 23:35 ` George Spelvin
2020-03-21 10:51 ` Johannes Schindelin
2020-03-21 17:56 ` George Spelvin
2020-03-25 19:26 ` Johannes Schindelin
2020-03-26 0:18 ` George Spelvin
2020-03-28 14:25 ` Johannes Schindelin
2020-03-28 16:30 ` George Spelvin
2020-03-31 0:00 ` George Spelvin
2020-03-31 10:57 ` Philip Oakley
2020-03-31 13:36 ` Phillip Wood
2020-04-01 16:43 ` Philip Oakley
2020-04-07 15:54 ` Phillip Wood
2020-04-04 12:17 ` Johannes Schindelin [this message]
2020-04-04 12:39 ` Johannes Schindelin
2020-04-04 17:41 ` George Spelvin
2020-04-06 10:40 ` Sebastien Bruckert
2020-04-06 15:24 ` George Spelvin
2020-04-07 9:16 ` Sebastien Bruckert
2020-04-07 19:03 ` George Spelvin
2020-03-30 14:01 ` Philip Oakley
2020-03-30 18:18 ` George Spelvin
2020-03-30 21:53 ` Philip Oakley
2020-03-21 8:47 ` Johannes Sixt
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=nycvar.QRO.7.76.6.2004041414370.46@tvgsbejvaqbjf.bet \
--to=johannes.schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=lkml@SDF.ORG \
--cc=philipoakley@iee.email \
/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).