mirror of
https://seed.radicle.dev/rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5.git
synced 2026-10-30 16:30:47 +08:00
Introduces a new COB type to store repository identity documents. The reason for this change is to: 1. Simplify the code, as the identity document logic resembled a COB, yet it had custom logic. This allows existing COB code to be used for identities. 2. Make identity document update logic more flexible, since COB actions can be added in the future. 3. Re-purpose existing tools around COBs to work on identities, eg. `rad cob`. 4. Unify the concept of an identity change proposal, with regular identity changes. This means we can remove the `id.proposal` COB in favor of using the `id` COB itself. Notes ----- * Each repository has one Identity COB. * The `Proposal` COB has been repurposed into the `Identity` COB. * Identity documents are stored as *embeds* inside the Identity COB actions. * The action that contains new document versions is called `revision`, just like the Patches COB. * The namespaced `rad/id` ref is a symbolic reference to that Identity COB. * The canonical `rad/id` ref is a direct reference to the commit in the Identity COB that contains the latest *accepted* revision of the document. * All commands for managing identities have been folded into `rad id`. Hence `rad delegate` and `rad edit` are removed. * The concept of "rebasing" an identity document is gone. * The `rad id` output has been updated to match the style of other commands. * When a revision has enough signatures, it is automatically adopted as the current identity, there is no longer the need for a "commit" action. * When an identity revision is proposed, and the current identity has a threshold of `1`, that identity is automatically accepted due to the above point. * The idea of "verifying a peer's identity branch" no longer applies, as COBs cannot be verified one history at a time. * Since the root commit of the Identity COB does not have a "Resource" to point to (it would have to point to itself, which is impossible), we've made the resource id optional for COBs.
1.5 KiB
1.5 KiB
If we have fetched a project, then we do not have a fork of the
repository in the storage, i.e. there is no ref hierarchy for our
NID. This is demonstrated below where our NID is
z6Mkt67GdsW7715MEfRuP4pSZxJRJh6kj6Y48WRqVv4N1tRk:
$ rad inspect rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji --refs
z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi
└── refs
├── cobs
│ └── xyz.radicle.id
│ └── [...]
├── heads
│ └── master
└── rad
├── id
└── sigrefs
To remedy this, we can use the rad fork command for the project we
wish to fork:
$ rad fork rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji
✓ Forked project rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji for z6Mkt67GdsW7715MEfRuP4pSZxJRJh6kj6Y48WRqVv4N1tRk
Now, if we rad inspect the project's refs again we will see that we
have a copy of the main set of refs:
$ rad inspect rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji --refs
z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi
└── refs
├── cobs
│ └── xyz.radicle.id
│ └── [...]
├── heads
│ └── master
└── rad
├── id
└── sigrefs
z6Mkt67GdsW7715MEfRuP4pSZxJRJh6kj6Y48WRqVv4N1tRk
└── refs
├── heads
│ └── master
└── rad
└── sigrefs
We are now able to setup a remote in our own working copy of the project and push to our own fork.