How do I split changes into separate patches?

Hello! I’m excited about using Pijul and I’m trying it out on some for-fun personal projects, and I’ve run into the trouble that I don’t know how to make patches that follow logical changes, when my personal development process is definitely more messy than that.

With git I would usually stash changes and then make multiple commits, although recently I’ve been looking at using https://blog.aloni.org/posts/gitology-1-git-flip-history/ which seems like a good solution for this “untangling multiple changes” workflow. I’m not sure how to do this with Pijul though, where I don’t see as clear of a path.

How do I untangle my work into multiple clean patches?

By design, there are no dependencies between sections of the patch in text format.

Therefore, you can start by doing pijul record --amend XYZ where XYZ is a prefix of the hash, remove stuff, and record again.

Or unrecord, record again, and open a few instances of your favourite text editor to cut and paste the result into multiple text patches. Then, you can pipe them into pijul apply .

Each of these text files will need a preamble and dependencies. You can safely copy paste the preamble of the original patch given by pijul record, since dependencies are recomputed anyway during parsing.

Let me know how that works.

1 Like