Re: [PATCH] rebase: introduce --update-branches option

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux