radicle-heartwood-lfs/crates/radicle-node/src/worker
Fintan Halpenny 0d96af5d07 node: update default branch for canonical refs
After a fetch is performed, `set_head` is called, which essentially updates the
default branch based on the canonical reference rule for that branch.

Later, `set_canonical_refs` is called, which originally could be the empty set
of rules. This would mean that the event for the default branch would never be
emitted.

The approach taken here is to always use the default branch rule if there are no
rules set in the identity document. Unfortunately, this ends up in computing the
default branch twice, due to `set_head`.

Another approach is to use the result of `set_head` to update the set of
`UpdatedCanonicalRefs`, to prevent the need for defaulting to the default branch
rule. However, this does not prevent the double counting as soon as the rules
are added to the identity document, since the default branch rule will then be
synthesised into the rule set.
2025-08-25 18:49:43 +01:00
..
channels.rs radicle-fetch: More fine-grained errors 2025-08-22 14:56:03 +02:00
fetch.rs node: update default branch for canonical refs 2025-08-25 18:49:43 +01:00
garbage.rs repo: Move workspace crates into `crates` subdirectory 2025-06-09 15:09:21 +02:00
upload_pack.rs repo: Move workspace crates into `crates` subdirectory 2025-06-09 15:09:21 +02:00