Looks OK - I had to think about it a bit, so maybe r and r' could
be better named and/or there could be some doc comments.
I don't think this change adds much type safety, as the rebase
modification operation is still unsafe in itself until tentative
has been changed. But I guess that's the nature of low-level
operations that only update a single part of the repository
state - it's up to higher-level things like tentativelyAddPatch_
to correctly orchestrate them.