Radish alpha
h
rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5
Radicle Heartwood Protocol & Stack
Radicle
Git
cli: test case for switch default branch
Open fintohaps opened 2 years ago crate=radicle-cli type=refactor

Zulip discussion[0].

To ensure that the user experience does not break when delegates decide to change the default branch of the repository, we should write a test to capture this behaviour.

I would expect that rad id should throw an error if the branch does not exist and does not meet the threshold.

fintohaps commented 2 years ago

It was pointed out that it seems like a weird flow if a threshold of delegates are required to replicate the default branch before the proposal is made.

In the case of threshold = 1, it should only require that the delegate making the proposal has the branch. Perhaps the branch gets created automatically.

In the case of threshold > 1, this implies that there is more than one delegate, which means that a quorum of delegates is needed to pass the proposal. We could have a flow which creates the default branch if it is accepted by that delegate.

However, there can be a case where threshold > quourum. In which case, the proposal passes but the default branch does not meet the threshold. So, perhaps in the case of fetching a new identity that has changed the default branch, we can create the new reference which points to the same commit as the old one.