The sound distributed version control system

#127 Ability to `pijul rec --amend` a change with dependents

Opened by cole-h on November 27, 2020
cole-h on November 27, 2020

It would be nice if we could amend a change that has dependents and just replay the dependent changes on top of it.

pmeunier on November 28, 2020

Yes indeed. Not sure how to do that though. What happens if you introduce a file in change A, and then edit it in B, but then amend A to say you never introduced the file in the first place?

cole-h on November 30, 2020

By that you mean A has added file asdf, and B has changed lines in file asdf, and you --amend A to remove the added file change? A very good question.

We should probably just disallow that (Dependent B modifies file introduced in A, but file is no longer introduced in A) altogether. Another option would be to remove that change from B (with a warning) but keep it on the user’s FS as an unrecorded change (e.g. shows up in pijul diff).

Ralith on December 11, 2020

As a user, I sometimes actually want to remove a file that was edited in (potentially many) dependent changes. Having to manually amend each dependent change before being able to remove the file would be unpleasant.