Modify change that has dependencies


I found the approach of Pijul interesting, and I started experimenting with it. Sorry if my question is not very wise, but how is it possible to rewrite some change in history that has dependent changes?

My experimental use case is:

I have a bunch of projects, most of them have a shared codebase. I want to organize them as a monorepo with different channels to avoid repeating myself.

I have the following imagine history:

A -> B -> C -> D (main)
       -> E -> F (channel)

I want to change B change (e.g., fix a minor bug or change dependency versions in Cargo.yaml, etc.), but I want to keep all other changes (C, D, E, F).

Is it possible to achieve this with Pijul? If yes, how can it be done?

Thanks in advice :slight_smile:

Hi! Welcome here.

This isn’t yet possible, but I’ve been working on things like this recently, I would hope this will finally come before the end of this year.

Some things that “sound easy” for other version control systems, like rewriting history, are sometimes much much harder to implement in Pijul than in others. Some things are also many times easier, like commutative patches.

Nice to hear that! Thanks for the reply

Just curious: why would you want to change B, instead of creating a change G and adding it to both channels? That would seem more logical to me. The notion of history is less important in pijul than in git, the way I see it.

One simple example I can think of: You accidentally check in a secret key and don’t notice for a while. Once you realise, you want to remove it from the history.

Sometimes errors like that happen and it’s often insufficient to remove it in a patch. You want to scrub all trace of it from the history without having to unrecorded and attempt to rerecord every dependent change.