Radish alpha
h
rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5
Radicle Heartwood Protocol & Stack
Radicle
Git
Patch API assumes the original author for retrieving data
Open fintohaps opened 11 months ago crate=radicle,radicle-cli,radicle-remote-helper

It’s well known that patches can be revised by many authors, and these revisions are tracked per-author.

This makes the API assuming the original author quite frustrating, since things like Patch::latest can mean the wrong thing when someone else has made a later revision taking over the work from the original author. The tooling, such as the CLI, will not look at the new revision.

In my opinion, the API should make the choice of authors and revisions much more explicit and have helpers for well-known values, e.g. Patch::original_author.

lorenz commented 11 months ago

I agree. This has bitten me many times.

I also agree that in case of ambiguity, the choice should more explicit.

However, I have another idea to make the ordering work better across various authors:

Whenever a new revision is created (probably in the remote helper), we can add populate a field in the newly created revision, which signals that it is intended to be “after” an already existing one. Very much like the “parent” in a Git commit, but on the level of revisions. This would allow us to restore an order in many cases. Surely not in all cases, especially when the various authors are not in sync with each other. But it should help.