The repository is already consistent, no changes made.
ben@home:.../scratch/screened>darcs optimize clean
Done cleaning repository!
I discovered this by reading the code. Indeed after reading the current
PatchSet, we convert it to an FL, run the repair operation, then convert to
a PatchSet NilRL (patches').
This is bad because it makes certain operations behind the latest clean tag
quite inefficient, such as cloning any earlier tag.
There are two solutions:
We can break up the algorithm, traversing the Tagged sections one by one,
reconstructing a PatchSet with the same overall structure as the one we
started out with.
Or we can re-construct a new inventory structure by creating a Tagged
section whenever we hit a clean tag. This is a bit easier to do since I
recently added that functionality for another reason (not yet published).