From: "brian m. carlson" <sandals@crustytoothpaste.net>
To: Warren He <pickydaemon@gmail.com>
Cc: git@vger.kernel.org, Warren He <wh109@yahoo.com>
Subject: Re: [PATCH] rebase: introduce --update-branches option
Date: Tue, 3 Sep 2019 00:50:18 +0000 [thread overview]
Message-ID: <20190903005018.GH11334@genre.crustytoothpaste.net> (raw)
In-Reply-To: <20190902234109.2922-1-wh109@yahoo.com>
[-- Attachment #1: Type: text/plain, Size: 2032 bytes --]
On 2019-09-02 at 23:41:08, Warren He wrote:
> Sometimes people have to rebase multiple related branches. One way to do that
> quickly, when there are branches pointing to ancestors of a later branch (which
> happens a lot if you try hard to pad your PR count on GitHub--I mean if you try
> to make small, logically separate changes), is to rebase that later branch and
> then reset ancestor branches to the rewritten commits. You just have to work
> out which branches correspond to which of the new commits.
>
> Here's an automated way to update those ancestor branches.
>
> It's implemented as a function that processes a todo list, modeled after
> `todo_list_add_exec_commands`. Currently steps are added as `exec git branch -f
> <branchname>`, which comes with the caveat that they're not applied atomically
> when it finishes rebasing.
This is an interesting idea, and I definitely would find myself using
it. I maintain multiple nested branches for the SHA-256 transition and
rebasing tends to be a bit of a hassle. The idea of reordering commits
further down into earlier branches using this technique is also
appealing.
I like the idea of using existing tooling for this and not needing an
additional verb.
My gut tells me folks may want a bit more control over *which* branches
are rebased, but I don't have a personal need for that, so I'm not going
to request it or propose an interface for it. If nobody else does, then
I think we should adopt the simplest approach, which is what you've
proposed. Users can always edit the todo list if they find an
unexpected branch, after all.
The other thought I had about this is a question about how it performs
with many refs. I've worked with a repository with easily 80,000 refs,
and I wonder if the current technique will perform adequately there.
I'm interested to hear others' opinions on this series and am looking
forward to seeing it progress.
--
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 868 bytes --]
next prev parent reply other threads:[~2019-09-03 0:50 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-02 23:41 [PATCH] rebase: introduce --update-branches option Warren He
2019-09-02 23:41 ` Warren He
2019-09-03 13:26 ` Johannes Schindelin
2019-09-07 23:44 ` [PATCH v2] " Warren He
2019-09-07 23:44 ` Warren He
2019-09-09 10:44 ` Phillip Wood
2019-09-09 14:13 ` Johannes Schindelin
2019-09-09 18:11 ` Junio C Hamano
2019-09-23 9:40 ` Phillip Wood
2019-09-03 0:50 ` brian m. carlson [this message]
2019-09-03 1:21 ` [PATCH] " Junio C Hamano
2019-09-03 1:39 ` Taylor Blau
2019-09-07 23:41 ` Warren He
2019-09-08 18:04 ` brian m. carlson
2019-09-03 12:19 ` Phillip Wood
2019-09-07 23:43 ` Warren He
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=20190903005018.GH11334@genre.crustytoothpaste.net \
--to=sandals@crustytoothpaste.net \
--cc=git@vger.kernel.org \
--cc=pickydaemon@gmail.com \
--cc=wh109@yahoo.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.
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).