Re: [PATCH RFC 00/11] Introduce git-history(1) command for easy history editing
- From
- Matthias Beyer <mail@beyermatthias.de>
- Date
- Dec 3, 2025, 18:18 UTC
- Message-ID
- <4m6rmefbv4hftclimitz5rp6yapswjtnjsxymrsdkuan4jbg3u@dm5jzdiq5cxz>
- In-Reply-To
- <aMsWL2cSoytbmRjA@szeder.dev>
Hi,
Am Wed, Sep 17, 2025 at 10:12:31PM +0200, schrieb SZEDER Gábor:
Show 39 quoted lines
> On Sun, Aug 24, 2025 at 06:03:02PM +0200, Patrick Steinhardt wrote: > > On Sat, Aug 23, 2025 at 06:25:06PM -0700, Martin von Zweigbergk wrote: > > > On Tue, Aug 19, 2025 at 3:57 AM Patrick Steinhardt <ps@pks.im> wrote: > > > > > > > > Hi, > > > > > > > > over recent months I've been playing around with Jujutsu quite > > > > frequently. While I still prefer using Git, there's been a couple > > > > features in it that I really like and that I'd like to have in Git, as > > > > well. > > > > > > > > A copule of these features relate to history editing. Most importantly, > > > > I really dig the following commands: > > > > > > > > - jj-abandon(1) to drop a specific commit from your history. > > > > > > It also rebases all descendants on top of the parent(s) of the > > > abandoned commit(s). Branches pointing to the rebased commits are also > > > repointed. So is the working copy if it points to a rebased commit > > > (the closest equivalent in Git would be HEAD). Do you plan to make all > > > the `git history` commands behave that way too? > > > > Yup. > > That sounds scary... What does "all descendants" mean in this > context? > > Let's suppose I have this piece of history, I'm on 'branch2', and I > drop commit B. Which commits will be rewritten and which branches > will be repointed? > > A---B---C---D branch1 > \ \ > \ E---F branch2 > \ \ > \ G---H---I branch3 > \ > J---K---L branch4 >
Just speaking as a user here, but my expectation in this scenario would be that rewriting B would be denied by default here, as branch{1..4} would be rewritten although I am at branch2.
In the scenario at hand, I would expect that I can only rewrite G, H, I while on branch 3 and J, K, L while on branch4 (without passing some extra flags for "yes, please also rewrite the other branches").
Just my 2cts