Radish alpha
h
rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5
Radicle Heartwood Protocol & Stack
Radicle
Git
feature: 'rad cob' subcommand to list COB types
Closed { reason: Solved } levitte opened 1 year ago

I’ve played around a bit with ‘rad cob’, and fuond it to be a bit of a hurdle to have to remember, or search for, the COB types, especially if those may vary from one repository to the other.

Would it be suitable to have a subcommand, possibly this, to list the COB types associated with a repository?

rad cob types --repo <rid>

Unfortunately, I’m a complete n00b when it comes to Rust, so it will take some time before I’ll be able to code something like this.

fintohaps commented 1 year ago

Seems like a reasonable thing to have :)

My proposed solution would be to use the repository to list all references using a refspec glob refs/cobs/*, you can then strip refs/cobs and take the first element after the next /. This will be the type name.

Tbh, you could also do this on the Unix command line :)

git -C ~/.radicle/storage/z3gqcJUoA1n9HaHKufZs5FCSGazv5 for-each-ref refs/namespaces | awk '{match($3, /refs\/namespaces\/[^/]+\/refs\/cobs\/([^/]+)/, arr); print arr[1]}' | sort | uniq


xyz.radicle.ci
xyz.radicle.id
xyz.radicle.issue
xyz.radicle.patch


z6MkgFq6...nBGz commented 7 months ago

This was implemented, so I’m closing this.