Spell "Radicle" with a captial R
In documentation and output, spell the name of the project with a captial "R".
This commit is contained in:
parent
bb97414a2d
commit
4f647b2a10
18
.typos.toml
18
.typos.toml
|
|
@ -17,3 +17,21 @@ extend-ignore-re = [
|
||||||
[type.codespell]
|
[type.codespell]
|
||||||
check-file = false
|
check-file = false
|
||||||
extend-glob = [".codespellrc"]
|
extend-glob = [".codespellrc"]
|
||||||
|
|
||||||
|
[type.md]
|
||||||
|
extend-ignore-re = [
|
||||||
|
"(Author:|author|committer) radicle ", # Commit Metadata
|
||||||
|
"/radicle:", # User Agent fragment
|
||||||
|
"\"radicle",
|
||||||
|
"\\.radicle", # Path fragment of default `$RAD_HOME`
|
||||||
|
"`radicle`",
|
||||||
|
"radicle heartwood protocol & stack", # Old fixture.
|
||||||
|
"radicle-\\w+", # Crates in Cargo style
|
||||||
|
"radicle\\.((example|zulipchat)\\.com|xyz)", # URLs
|
||||||
|
"radicle\\w*::", # Crates in Rust code style
|
||||||
|
"xyz\\.radicle\\.(issue|patch|id)", # COB Type Names
|
||||||
|
]
|
||||||
|
|
||||||
|
[type.md.extend-identifiers]
|
||||||
|
"radicle" = "Radicle"
|
||||||
|
|
||||||
|
|
|
||||||
16
HACKING.md
16
HACKING.md
|
|
@ -24,7 +24,7 @@ The repository is structured in *crates*, as follows:
|
||||||
* `radicle-crdt`: Conflict-free replicated datatypes (CRDTs) used for things like discussions and patches.
|
* `radicle-crdt`: Conflict-free replicated datatypes (CRDTs) used for things like discussions and patches.
|
||||||
* `radicle-crypto`: A wrapper around Ed25519 cryptographic signing primitives.
|
* `radicle-crypto`: A wrapper around Ed25519 cryptographic signing primitives.
|
||||||
* `radicle-dag`: A simple directed acyclic graph implementation used by `radicle-cob`.
|
* `radicle-dag`: A simple directed acyclic graph implementation used by `radicle-cob`.
|
||||||
* `radicle-node`: The radicle peer-to-peer daemon that enables users to connect to the network and share code.
|
* `radicle-node`: The Radicle peer-to-peer daemon that enables users to connect to the network and share code.
|
||||||
* `radicle-remote-helper`: A Git remote helper for `rad://` remotes.
|
* `radicle-remote-helper`: A Git remote helper for `rad://` remotes.
|
||||||
* `radicle-term`: A generic terminal library used by the Radicle CLI.
|
* `radicle-term`: A generic terminal library used by the Radicle CLI.
|
||||||
* `radicle-tools`: Tools used to aid in the development of Radicle.
|
* `radicle-tools`: Tools used to aid in the development of Radicle.
|
||||||
|
|
@ -54,7 +54,7 @@ specify different listen addresses for the peer-to-peer protocol using `--listen
|
||||||
To view all options, run `cargo run -p radicle-node -- --help`.
|
To view all options, run `cargo run -p radicle-node -- --help`.
|
||||||
|
|
||||||
You may want to set the appropriate environment variables before running these commands
|
You may want to set the appropriate environment variables before running these commands
|
||||||
to prevent them from interfering with an existing installation of radicle. See the
|
to prevent them from interfering with an existing installation of Radicle. See the
|
||||||
following section on environment variables.
|
following section on environment variables.
|
||||||
|
|
||||||
## Running in isolation
|
## Running in isolation
|
||||||
|
|
@ -75,14 +75,14 @@ very large repositories.
|
||||||
|
|
||||||
## Environment variables
|
## Environment variables
|
||||||
|
|
||||||
When developing radicle, some environment variables may be used to make the
|
When developing Radicle, some environment variables may be used to make the
|
||||||
development environment more friendly.
|
development environment more friendly.
|
||||||
|
|
||||||
**`RAD_HOME`**
|
**`RAD_HOME`**
|
||||||
|
|
||||||
Set this to a path on your file system where you'd like radicle to store keys
|
Set this to a path on your file system where you'd like Radicle to store keys
|
||||||
and repositories. Typically you'll want to set this to a temporary folder, eg.
|
and repositories. Typically you'll want to set this to a temporary folder, eg.
|
||||||
`/tmp/radicle`, that can be safely deleted. If set, all radicle data will be
|
`/tmp/radicle`, that can be safely deleted. If set, all Radicle data will be
|
||||||
stored within this folder.
|
stored within this folder.
|
||||||
|
|
||||||
**`RAD_KEYGEN_SEED`**
|
**`RAD_KEYGEN_SEED`**
|
||||||
|
|
@ -136,7 +136,7 @@ possible to write an end-to-end test. These tests can be found in
|
||||||
|
|
||||||
Radicle stores git repositories inside `$RAD_HOME/storage`, which defaults to
|
Radicle stores git repositories inside `$RAD_HOME/storage`, which defaults to
|
||||||
`~/.radicle/storage` on UNIX-based operating systems. You can use standard git
|
`~/.radicle/storage` on UNIX-based operating systems. You can use standard git
|
||||||
tooling to inspect references and other git objects inside storage. Each radicle
|
tooling to inspect references and other git objects inside storage. Each Radicle
|
||||||
repository is stored under its own folder under storage as a bare Git repository.
|
repository is stored under its own folder under storage as a bare Git repository.
|
||||||
|
|
||||||
Once inside a repository folder, the following commands may come in handy.
|
Once inside a repository folder, the following commands may come in handy.
|
||||||
|
|
@ -173,7 +173,7 @@ remote refs in storage.
|
||||||
|
|
||||||
### Connecting to your local node
|
### Connecting to your local node
|
||||||
|
|
||||||
The radicle node listens on a UNIX domain socket located at
|
The Radicle node listens on a UNIX domain socket located at
|
||||||
`$RAD_HOME/node/control.sock`. Make sure this file is accessible and has the
|
`$RAD_HOME/node/control.sock`. Make sure this file is accessible and has the
|
||||||
required permissions for your user to read and write to it.
|
required permissions for your user to read and write to it.
|
||||||
|
|
||||||
|
|
@ -183,5 +183,5 @@ Radicle uses Ed25519 keys that are located in `$RAD_HOME/keys`. These keys are
|
||||||
encoded in the standard OpenSSH format. It's therefore possible to use standard
|
encoded in the standard OpenSSH format. It's therefore possible to use standard
|
||||||
OpenSSH tools to interact with them, eg. `ssh-add`.
|
OpenSSH tools to interact with them, eg. `ssh-add`.
|
||||||
|
|
||||||
Your radicle secret key is protected with a passphrase (See: `$RAD_PASSPHRASE`).
|
Your Radicle secret key is protected with a passphrase (See: `$RAD_PASSPHRASE`).
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ The example below is run with `RAD_PASSPHRASE` set.
|
||||||
```
|
```
|
||||||
$ rad auth --alias "alice"
|
$ rad auth --alias "alice"
|
||||||
|
|
||||||
Initializing your radicle 👾 identity
|
Initializing your Radicle 👾 identity
|
||||||
|
|
||||||
✓ Creating your Ed25519 keypair...
|
✓ Creating your Ed25519 keypair...
|
||||||
✓ Your Radicle DID is did:key:z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi. This identifies your device. Run `rad self` to show it at all times.
|
✓ Your Radicle DID is did:key:z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi. This identifies your device. Run `rad self` to show it at all times.
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
To create a local bare copy of a repository on the radicle network, we use the
|
To create a local bare copy of a repository on the Radicle network, we use the
|
||||||
`clone` command, followed by the identifier or *RID* of the repository:
|
`clone` command, followed by the identifier or *RID* of the repository:
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
To create a local copy of a repository on the radicle network, we use the
|
To create a local copy of a repository on the Radicle network, we use the
|
||||||
`clone` command, followed by the identifier or *RID* of the repository:
|
`clone` command, followed by the identifier or *RID* of the repository:
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@ $ rad config schema
|
||||||
{
|
{
|
||||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||||
"title": "Config",
|
"title": "Config",
|
||||||
"description": "Local radicle configuration.",
|
"description": "Local Radicle configuration.",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"publicExplorer": {
|
"publicExplorer": {
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ And initialize this working copy as that existing repository:
|
||||||
```
|
```
|
||||||
$ rad init --setup-signing --existing rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji
|
$ rad init --setup-signing --existing rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji
|
||||||
|
|
||||||
Configuring radicle signing key SHA256:UIedaL6Cxm6OUErh9GQUzzglSk7VpQlVTI1TAFB/HWA...
|
Configuring Radicle signing key SHA256:UIedaL6Cxm6OUErh9GQUzzglSk7VpQlVTI1TAFB/HWA...
|
||||||
|
|
||||||
✓ Signing configured in [..]/heartwood/config
|
✓ Signing configured in [..]/heartwood/config
|
||||||
! Not writing .gitsigners file.
|
! Not writing .gitsigners file.
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ And initialize this working copy as that existing repository:
|
||||||
```
|
```
|
||||||
$ rad init --setup-signing --existing rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji
|
$ rad init --setup-signing --existing rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji
|
||||||
|
|
||||||
Configuring radicle signing key SHA256:UIedaL6Cxm6OUErh9GQUzzglSk7VpQlVTI1TAFB/HWA...
|
Configuring Radicle signing key SHA256:UIedaL6Cxm6OUErh9GQUzzglSk7VpQlVTI1TAFB/HWA...
|
||||||
|
|
||||||
✓ Signing configured in [..]/heartwood/.git/config
|
✓ Signing configured in [..]/heartwood/.git/config
|
||||||
✓ Created .gitsigners file
|
✓ Created .gitsigners file
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ If we initialize a public repository without seeding it, it won't be advertised:
|
||||||
```
|
```
|
||||||
$ rad init --name heartwood --description "radicle heartwood protocol & stack" --no-confirm --public --no-seed
|
$ rad init --name heartwood --description "radicle heartwood protocol & stack" --no-confirm --public --no-seed
|
||||||
|
|
||||||
Initializing public radicle 👾 repository in [..]
|
Initializing public Radicle 👾 repository in [..]
|
||||||
|
|
||||||
✓ Repository heartwood created.
|
✓ Repository heartwood created.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ from us.
|
||||||
```
|
```
|
||||||
$ rad init --name heartwood --description "radicle heartwood protocol & stack" --no-confirm --private --no-seed
|
$ rad init --name heartwood --description "radicle heartwood protocol & stack" --no-confirm --private --no-seed
|
||||||
|
|
||||||
Initializing private radicle 👾 repository in [..]
|
Initializing private Radicle 👾 repository in [..]
|
||||||
|
|
||||||
✓ Repository heartwood created.
|
✓ Repository heartwood created.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ Alice can initialize a *private* repo using the `--private` flag.
|
||||||
```
|
```
|
||||||
$ rad init --name heartwood --description "radicle heartwood protocol & stack" --no-confirm --private
|
$ rad init --name heartwood --description "radicle heartwood protocol & stack" --no-confirm --private
|
||||||
|
|
||||||
Initializing private radicle 👾 repository in [..]
|
Initializing private Radicle 👾 repository in [..]
|
||||||
|
|
||||||
✓ Repository heartwood created.
|
✓ Repository heartwood created.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ When initializing a repository without any peer connections, we get this output:
|
||||||
```
|
```
|
||||||
$ rad init --name heartwood --description "Radicle Heartwood Protocol & Stack" --no-confirm --public --scope followed
|
$ rad init --name heartwood --description "Radicle Heartwood Protocol & Stack" --no-confirm --public --scope followed
|
||||||
|
|
||||||
Initializing public radicle 👾 repository in [..]
|
Initializing public Radicle 👾 repository in [..]
|
||||||
|
|
||||||
✓ Repository heartwood created.
|
✓ Repository heartwood created.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ Let's try initializing a new repository with a preferred seed configured.
|
||||||
```
|
```
|
||||||
$ rad init --name heartwood --description "Radicle Heartwood Protocol & Stack" --no-confirm --public --scope followed
|
$ rad init --name heartwood --description "Radicle Heartwood Protocol & Stack" --no-confirm --public --scope followed
|
||||||
|
|
||||||
Initializing public radicle 👾 repository in [..]
|
Initializing public Radicle 👾 repository in [..]
|
||||||
|
|
||||||
✓ Repository heartwood created.
|
✓ Repository heartwood created.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ as the node will keep attempting to sync in the background.
|
||||||
```
|
```
|
||||||
$ rad init --name heartwood --description "Radicle Heartwood Protocol & Stack" --no-confirm --public --scope followed
|
$ rad init --name heartwood --description "Radicle Heartwood Protocol & Stack" --no-confirm --public --scope followed
|
||||||
|
|
||||||
Initializing public radicle 👾 repository in [..]
|
Initializing public Radicle 👾 repository in [..]
|
||||||
|
|
||||||
✓ Repository heartwood created.
|
✓ Repository heartwood created.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
|
|
||||||
To create your first radicle repository, navigate to a git repository, and run
|
To create your first Radicle repository, navigate to a git repository, and run
|
||||||
the `init` command:
|
the `init` command:
|
||||||
|
|
||||||
```
|
```
|
||||||
$ rad init --name heartwood --description "Radicle Heartwood Protocol & Stack" --no-confirm --public --scope followed
|
$ rad init --name heartwood --description "Radicle Heartwood Protocol & Stack" --no-confirm --public --scope followed
|
||||||
|
|
||||||
Initializing public radicle 👾 repository in [..]
|
Initializing public Radicle 👾 repository in [..]
|
||||||
|
|
||||||
✓ Repository heartwood created.
|
✓ Repository heartwood created.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ Then we initialize.
|
||||||
```
|
```
|
||||||
$ rad init --name heartwood --description "Heartwood Protocol & Stack" --no-confirm --public
|
$ rad init --name heartwood --description "Heartwood Protocol & Stack" --no-confirm --public
|
||||||
|
|
||||||
Initializing public radicle 👾 repository in [..]
|
Initializing public Radicle 👾 repository in [..]
|
||||||
|
|
||||||
✓ Repository heartwood created.
|
✓ Repository heartwood created.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
|
|
||||||
To create your first radicle repository, navigate to a git repository, and run the
|
To create your first Radicle repository, navigate to a git repository, and run the
|
||||||
`init` command. Make sure you have [authenticated](../rad-auth.md) beforehand.
|
`init` command. Make sure you have [authenticated](../rad-auth.md) beforehand.
|
||||||
|
|
||||||
```
|
```
|
||||||
$ rad init --name heartwood --description "Radicle Heartwood Protocol & Stack" --no-confirm --public -v
|
$ rad init --name heartwood --description "Radicle Heartwood Protocol & Stack" --no-confirm --public -v
|
||||||
|
|
||||||
Initializing public radicle 👾 repository in [..]
|
Initializing public Radicle 👾 repository in [..]
|
||||||
|
|
||||||
✓ Repository heartwood created.
|
✓ Repository heartwood created.
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
The `rad inspect` command can be run without being authenticated with radicle:
|
The `rad inspect` command can be run without being authenticated with Radicle:
|
||||||
|
|
||||||
``` (fail)
|
``` (fail)
|
||||||
$ rad self
|
$ rad self
|
||||||
✗ Error: Radicle profile not found in '[..]'.
|
✗ Error: Radicle profile not found in '[..]'.
|
||||||
✗ Hint: To setup your radicle profile, run `rad auth`.
|
✗ Hint: To setup your Radicle profile, run `rad auth`.
|
||||||
```
|
```
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
The radicle node is our daemon friend that is running as a background
|
The Radicle node is our daemon friend that is running as a background
|
||||||
process. It allows us to interact with the network as well as storing
|
process. It allows us to interact with the network as well as storing
|
||||||
some key data that we may be interested in.
|
some key data that we may be interested in.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ Alice creates a repository and Bob clones it.
|
||||||
``` ~alice
|
``` ~alice
|
||||||
$ rad init --name heartwood --description "radicle heartwood protocol & stack" --no-confirm --public
|
$ rad init --name heartwood --description "radicle heartwood protocol & stack" --no-confirm --public
|
||||||
|
|
||||||
Initializing public radicle 👾 repository in [..]
|
Initializing public Radicle 👾 repository in [..]
|
||||||
|
|
||||||
✓ Repository heartwood created.
|
✓ Repository heartwood created.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
Back to being the project maintainer.
|
Back to being the project maintainer.
|
||||||
|
|
||||||
Changes have been proposed by another peer via a radicle patch. To track
|
Changes have been proposed by another peer via a Radicle patch. To track
|
||||||
changes from another peer, we must first follow them, and then create
|
changes from another peer, we must first follow them, and then create
|
||||||
a tracking branch in our working copy. The `rad remote add` command does all
|
a tracking branch in our working copy. The `rad remote add` command does all
|
||||||
of this.
|
of this.
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ pub fn run(args: Args, ctx: impl term::Context) -> anyhow::Result<()> {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn init(args: Args) -> anyhow::Result<()> {
|
pub fn init(args: Args) -> anyhow::Result<()> {
|
||||||
term::headline("Initializing your radicle 👾 identity");
|
term::headline("Initializing your Radicle 👾 identity");
|
||||||
|
|
||||||
if let Ok(version) = radicle::git::version() {
|
if let Ok(version) = radicle::git::version() {
|
||||||
if version < radicle::git::VERSION_REQUIRED {
|
if version < radicle::git::VERSION_REQUIRED {
|
||||||
|
|
@ -63,11 +63,11 @@ pub fn init(args: Args) -> anyhow::Result<()> {
|
||||||
if let Some(passphrase) = passphrase {
|
if let Some(passphrase) = passphrase {
|
||||||
match ssh::agent::Agent::connect() {
|
match ssh::agent::Agent::connect() {
|
||||||
Ok(mut agent) => {
|
Ok(mut agent) => {
|
||||||
let mut spinner = term::spinner("Adding your radicle key to ssh-agent...");
|
let mut spinner = term::spinner("Adding your Radicle key to ssh-agent...");
|
||||||
if register(&mut agent, &profile, passphrase).is_ok() {
|
if register(&mut agent, &profile, passphrase).is_ok() {
|
||||||
spinner.finish();
|
spinner.finish();
|
||||||
} else {
|
} else {
|
||||||
spinner.message("Could not register radicle key in ssh-agent.");
|
spinner.message("Could not register Radicle key in ssh-agent.");
|
||||||
spinner.warn();
|
spinner.warn();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ use radicle::node::Alias;
|
||||||
const ABOUT: &str = "Manage your local Radicle configuration";
|
const ABOUT: &str = "Manage your local Radicle configuration";
|
||||||
|
|
||||||
const LONG_ABOUT: &str = r#"
|
const LONG_ABOUT: &str = r#"
|
||||||
If no argument is specified, prints the current radicle configuration as JSON.
|
If no argument is specified, prints the current Radicle configuration as JSON.
|
||||||
To initialize a new configuration file, use `rad config init`.
|
To initialize a new configuration file, use `rad config init`.
|
||||||
"#;
|
"#;
|
||||||
|
|
||||||
|
|
@ -18,7 +18,7 @@ pub struct Args {
|
||||||
#[derive(Subcommand, Debug)]
|
#[derive(Subcommand, Debug)]
|
||||||
#[group(multiple = false)]
|
#[group(multiple = false)]
|
||||||
pub(crate) enum Command {
|
pub(crate) enum Command {
|
||||||
/// Show the current radicle configuration as JSON (default)
|
/// Show the current Radicle configuration as JSON (default)
|
||||||
Show,
|
Show,
|
||||||
/// Initialize a new config file
|
/// Initialize a new config file
|
||||||
Init {
|
Init {
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,7 @@ pub fn init(repo: git::Repository, args: Args, profile: &profile::Profile) -> an
|
||||||
};
|
};
|
||||||
|
|
||||||
term::headline(format!(
|
term::headline(format!(
|
||||||
"Initializing{}radicle 👾 repository in {}..",
|
"Initializing{}Radicle 👾 repository in {}..",
|
||||||
match visibility {
|
match visibility {
|
||||||
Some(ref visibility) => term::format::spaced(term::format::visibility(visibility)),
|
Some(ref visibility) => term::format::spaced(term::format::visibility(visibility)),
|
||||||
None => term::format::default(" ").into(),
|
None => term::format::default(" ").into(),
|
||||||
|
|
@ -181,7 +181,7 @@ pub fn init(repo: git::Repository, args: Args, profile: &profile::Profile) -> an
|
||||||
}
|
}
|
||||||
|
|
||||||
if args.setup_signing {
|
if args.setup_signing {
|
||||||
// Setup radicle signing key.
|
// Setup Radicle signing key.
|
||||||
self::setup_signing(profile.id(), &repo, interactive)?;
|
self::setup_signing(profile.id(), &repo, interactive)?;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -254,7 +254,7 @@ pub fn init_existing(
|
||||||
}
|
}
|
||||||
|
|
||||||
if args.setup_signing {
|
if args.setup_signing {
|
||||||
// Setup radicle signing key.
|
// Setup Radicle signing key.
|
||||||
self::setup_signing(profile.id(), &working, interactive)?;
|
self::setup_signing(profile.id(), &working, interactive)?;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -483,7 +483,7 @@ pub fn announce(
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Setup radicle key as commit signing key in repository.
|
/// Setup Radicle key as commit signing key in repository.
|
||||||
pub fn setup_signing(
|
pub fn setup_signing(
|
||||||
node_id: &NodeId,
|
node_id: &NodeId,
|
||||||
repo: &git::Repository,
|
repo: &git::Repository,
|
||||||
|
|
@ -497,13 +497,13 @@ pub fn setup_signing(
|
||||||
let key = ssh::fmt::fingerprint(node_id);
|
let key = ssh::fmt::fingerprint(node_id);
|
||||||
let yes = if !git::is_signing_configured(path)? {
|
let yes = if !git::is_signing_configured(path)? {
|
||||||
term::headline(format!(
|
term::headline(format!(
|
||||||
"Configuring radicle signing key {}...",
|
"Configuring Radicle signing key {}...",
|
||||||
term::format::tertiary(key)
|
term::format::tertiary(key)
|
||||||
));
|
));
|
||||||
true
|
true
|
||||||
} else if interactive.yes() {
|
} else if interactive.yes() {
|
||||||
term::confirm(format!(
|
term::confirm(format!(
|
||||||
"Configure radicle signing key {} in {}?",
|
"Configure Radicle signing key {} in {}?",
|
||||||
term::format::tertiary(key),
|
term::format::tertiary(key),
|
||||||
term::format::tertiary(config.display()),
|
term::format::tertiary(config.display()),
|
||||||
))
|
))
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ pub struct Args {
|
||||||
/// Setup the upstream of the default branch
|
/// Setup the upstream of the default branch
|
||||||
#[arg(short = 'u', long)]
|
#[arg(short = 'u', long)]
|
||||||
pub(super) set_upstream: bool,
|
pub(super) set_upstream: bool,
|
||||||
/// Setup the radicle key as a signing key for this repository
|
/// Setup the Radicle key as a signing key for this repository
|
||||||
#[arg(long)]
|
#[arg(long)]
|
||||||
pub(super) setup_signing: bool,
|
pub(super) setup_signing: bool,
|
||||||
/// Don't ask for confirmation during setup
|
/// Don't ask for confirmation during setup
|
||||||
|
|
|
||||||
|
|
@ -251,7 +251,7 @@ pub fn is_signing_configured(repo: &Path) -> Result<bool, anyhow::Error> {
|
||||||
Ok(git(repo, ["config", CONFIG_SIGNING_KEY]).is_ok())
|
Ok(git(repo, ["config", CONFIG_SIGNING_KEY]).is_ok())
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Return the list of radicle remotes for the given repository.
|
/// Return the list of Radicle remotes for the given repository.
|
||||||
pub fn rad_remotes(repo: &Repository) -> anyhow::Result<Vec<Remote<'_>>> {
|
pub fn rad_remotes(repo: &Repository) -> anyhow::Result<Vec<Remote<'_>>> {
|
||||||
let remotes: Vec<_> = repo
|
let remotes: Vec<_> = repo
|
||||||
.remotes()?
|
.remotes()?
|
||||||
|
|
@ -278,7 +278,7 @@ pub fn rad_remote(repo: &Repository) -> anyhow::Result<(git::raw::Remote<'_>, Re
|
||||||
match radicle::rad::remote(repo) {
|
match radicle::rad::remote(repo) {
|
||||||
Ok((remote, id)) => Ok((remote, id)),
|
Ok((remote, id)) => Ok((remote, id)),
|
||||||
Err(radicle::rad::RemoteError::NotFound(_)) => Err(anyhow!(
|
Err(radicle::rad::RemoteError::NotFound(_)) => Err(anyhow!(
|
||||||
"could not find radicle remote in git config; did you forget to run `rad init`?"
|
"could not find Radicle remote in git config; did you forget to run `rad init`?"
|
||||||
)),
|
)),
|
||||||
Err(err) => Err(err).context("could not read git remote configuration"),
|
Err(err) => Err(err).context("could not read git remote configuration"),
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -47,11 +47,11 @@ impl Context for DefaultContext {
|
||||||
Ok(profile) => Ok(profile),
|
Ok(profile) => Ok(profile),
|
||||||
Err(radicle::profile::Error::NotFound(path)) => Err(args::Error::with_hint(
|
Err(radicle::profile::Error::NotFound(path)) => Err(args::Error::with_hint(
|
||||||
anyhow::anyhow!("Radicle profile not found in '{}'.", path.display()),
|
anyhow::anyhow!("Radicle profile not found in '{}'.", path.display()),
|
||||||
"To setup your radicle profile, run `rad auth`.",
|
"To setup your Radicle profile, run `rad auth`.",
|
||||||
)
|
)
|
||||||
.into()),
|
.into()),
|
||||||
Err(radicle::profile::Error::LoadConfig(e)) => Err(e.into()),
|
Err(radicle::profile::Error::LoadConfig(e)) => Err(e.into()),
|
||||||
Err(e) => Err(anyhow::anyhow!("Could not load radicle profile: {e}")),
|
Err(e) => Err(anyhow::anyhow!("Could not load Radicle profile: {e}")),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -78,7 +78,7 @@ impl RepoId {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Parse an identifier from the human-readable URN format.
|
/// Parse an identifier from the human-readable URN format.
|
||||||
/// Accepts strings without the radicle prefix as well,
|
/// Accepts strings without the prefix [`RAD_PREFIX`] as well,
|
||||||
/// for convenience.
|
/// for convenience.
|
||||||
pub fn from_urn(s: &str) -> Result<Self, IdError> {
|
pub fn from_urn(s: &str) -> Result<Self, IdError> {
|
||||||
let s = s.strip_prefix(RAD_PREFIX).unwrap_or(s);
|
let s = s.strip_prefix(RAD_PREFIX).unwrap_or(s);
|
||||||
|
|
|
||||||
|
|
@ -210,7 +210,7 @@ struct Options {
|
||||||
verbosity: Verbosity,
|
verbosity: Verbosity,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Run the radicle remote helper using the given profile.
|
/// Run the Radicle remote helper using the given profile.
|
||||||
fn run(profile: radicle::Profile) -> Result<(), Error> {
|
fn run(profile: radicle::Profile) -> Result<(), Error> {
|
||||||
// Since we're going to be writing user output to `stderr`, make sure the paint
|
// Since we're going to be writing user output to `stderr`, make sure the paint
|
||||||
// module is aware of that.
|
// module is aware of that.
|
||||||
|
|
|
||||||
|
|
@ -361,7 +361,7 @@ pub fn passphrase_confirm<K: AsRef<OsStr>>(prompt: &str, var: K) -> io::Result<O
|
||||||
.with_display_mode(inquire::PasswordDisplayMode::Masked)
|
.with_display_mode(inquire::PasswordDisplayMode::Masked)
|
||||||
.with_custom_confirmation_message("Repeat passphrase:")
|
.with_custom_confirmation_message("Repeat passphrase:")
|
||||||
.with_custom_confirmation_error_message("The passphrases don't match.")
|
.with_custom_confirmation_error_message("The passphrases don't match.")
|
||||||
.with_help_message("Leave this blank to keep your radicle key unencrypted")
|
.with_help_message("Leave this blank to keep your Radicle key unencrypted")
|
||||||
.prompt()
|
.prompt()
|
||||||
{
|
{
|
||||||
Ok(p) => Ok(Some(Passphrase::from(p))),
|
Ok(p) => Ok(Some(Passphrase::from(p))),
|
||||||
|
|
|
||||||
|
|
@ -594,7 +594,7 @@ pub fn write_tree<'r>(
|
||||||
Ok(tree)
|
Ok(tree)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Configure a radicle repository.
|
/// Configure a Radicle repository.
|
||||||
///
|
///
|
||||||
/// * Sets `push.default = upstream`.
|
/// * Sets `push.default = upstream`.
|
||||||
pub fn configure_repository(repo: &raw::Repository) -> Result<(), raw::Error> {
|
pub fn configure_repository(repo: &raw::Repository) -> Result<(), raw::Error> {
|
||||||
|
|
@ -604,7 +604,7 @@ pub fn configure_repository(repo: &raw::Repository) -> Result<(), raw::Error> {
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Configure a repository's radicle remote.
|
/// Configure a repository's Radicle remote.
|
||||||
///
|
///
|
||||||
/// The entry for this remote will be:
|
/// The entry for this remote will be:
|
||||||
/// ```text
|
/// ```text
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@ pub use timestamp::Timestamp;
|
||||||
|
|
||||||
/// Peer-to-peer protocol version.
|
/// Peer-to-peer protocol version.
|
||||||
pub const PROTOCOL_VERSION: u8 = 1;
|
pub const PROTOCOL_VERSION: u8 = 1;
|
||||||
/// Default radicle protocol port.
|
/// Default Radicle protocol port.
|
||||||
pub const DEFAULT_PORT: u16 = 8776;
|
pub const DEFAULT_PORT: u16 = 8776;
|
||||||
/// Default timeout when waiting for an event to be received on the
|
/// Default timeout when waiting for an event to be received on the
|
||||||
/// [`Handle::subscribe`] channel.
|
/// [`Handle::subscribe`] channel.
|
||||||
|
|
|
||||||
|
|
@ -35,21 +35,21 @@ use crate::storage::git::Storage;
|
||||||
use crate::storage::git::transport;
|
use crate::storage::git::transport;
|
||||||
use crate::{cob, git, node, storage};
|
use crate::{cob, git, node, storage};
|
||||||
|
|
||||||
/// Environment variables used by radicle.
|
/// Environment variables used by Radicle.
|
||||||
pub mod env {
|
pub mod env {
|
||||||
pub use std::env::*;
|
pub use std::env::*;
|
||||||
|
|
||||||
/// Path to the radicle home folder.
|
/// Path to the Radicle home folder.
|
||||||
pub const RAD_HOME: &str = "RAD_HOME";
|
pub const RAD_HOME: &str = "RAD_HOME";
|
||||||
/// Path to the radicle node socket file.
|
/// Path to the Radicle node socket file.
|
||||||
pub const RAD_SOCKET: &str = "RAD_SOCKET";
|
pub const RAD_SOCKET: &str = "RAD_SOCKET";
|
||||||
/// Passphrase for the encrypted radicle secret key.
|
/// Passphrase for the encrypted Radicle secret key.
|
||||||
pub const RAD_PASSPHRASE: &str = "RAD_PASSPHRASE";
|
pub const RAD_PASSPHRASE: &str = "RAD_PASSPHRASE";
|
||||||
/// RNG seed. Must be convertible to a `u64`.
|
/// RNG seed. Must be convertible to a `u64`.
|
||||||
pub const RAD_RNG_SEED: &str = "RAD_RNG_SEED";
|
pub const RAD_RNG_SEED: &str = "RAD_RNG_SEED";
|
||||||
/// Private key seed. Used for generating deterministic keypairs.
|
/// Private key seed. Used for generating deterministic keypairs.
|
||||||
pub const RAD_KEYGEN_SEED: &str = "RAD_KEYGEN_SEED";
|
pub const RAD_KEYGEN_SEED: &str = "RAD_KEYGEN_SEED";
|
||||||
/// Show radicle hints.
|
/// Show Radicle hints.
|
||||||
pub const RAD_HINT: &str = "RAD_HINT";
|
pub const RAD_HINT: &str = "RAD_HINT";
|
||||||
/// Environment variable to set to overwrite the commit date for both
|
/// Environment variable to set to overwrite the commit date for both
|
||||||
/// the author and the committer.
|
/// the author and the committer.
|
||||||
|
|
@ -102,7 +102,7 @@ pub mod env {
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get the radicle passphrase from the environment.
|
/// Get the Radicle passphrase from the environment.
|
||||||
pub fn passphrase() -> Option<super::Passphrase> {
|
pub fn passphrase() -> Option<super::Passphrase> {
|
||||||
let Ok(passphrase) = var(RAD_PASSPHRASE) else {
|
let Ok(passphrase) = var(RAD_PASSPHRASE) else {
|
||||||
return None;
|
return None;
|
||||||
|
|
@ -175,7 +175,7 @@ pub enum Error {
|
||||||
Routing(#[from] node::routing::Error),
|
Routing(#[from] node::routing::Error),
|
||||||
#[error(transparent)]
|
#[error(transparent)]
|
||||||
Keystore(#[from] keystore::Error),
|
Keystore(#[from] keystore::Error),
|
||||||
#[error("no radicle profile found at path '{0}'")]
|
#[error("no Radicle profile found at path '{0}'")]
|
||||||
NotFound(PathBuf),
|
NotFound(PathBuf),
|
||||||
#[error(transparent)]
|
#[error(transparent)]
|
||||||
PolicyStore(#[from] node::policy::store::Error),
|
PolicyStore(#[from] node::policy::store::Error),
|
||||||
|
|
@ -199,7 +199,7 @@ pub enum SignerError {
|
||||||
#[error(transparent)]
|
#[error(transparent)]
|
||||||
Agent(#[from] crate::crypto::ssh::agent::AgentError),
|
Agent(#[from] crate::crypto::ssh::agent::AgentError),
|
||||||
|
|
||||||
#[error("radicle key `{0}` is not registered; run `rad auth` to register it with ssh-agent")]
|
#[error("Radicle key `{0}` is not registered; run `rad auth` to register it with ssh-agent")]
|
||||||
KeyNotRegistered(PublicKey),
|
KeyNotRegistered(PublicKey),
|
||||||
|
|
||||||
#[error(transparent)]
|
#[error(transparent)]
|
||||||
|
|
@ -342,7 +342,7 @@ impl Profile {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get radicle home.
|
/// Get Radicle home.
|
||||||
pub fn home(&self) -> &Home {
|
pub fn home(&self) -> &Home {
|
||||||
&self.home
|
&self.home
|
||||||
}
|
}
|
||||||
|
|
@ -488,7 +488,7 @@ impl AliasStore for Aliases {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get the path to the radicle home folder.
|
/// Get the path to the Radicle home folder.
|
||||||
pub fn home() -> Result<Home, io::Error> {
|
pub fn home() -> Result<Home, io::Error> {
|
||||||
#[cfg(unix)]
|
#[cfg(unix)]
|
||||||
const ERROR_MESSAGE_UNSET: &str =
|
const ERROR_MESSAGE_UNSET: &str =
|
||||||
|
|
|
||||||
|
|
@ -128,7 +128,7 @@ pub enum LoadError {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Local radicle configuration.
|
/// Local Radicle configuration.
|
||||||
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
|
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
|
#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
|
||||||
|
|
|
||||||
|
|
@ -20,9 +20,9 @@ use crate::storage::{ReadRepository as _, RemoteId, SignRepository as _};
|
||||||
use crate::storage::{WriteRepository, WriteStorage};
|
use crate::storage::{WriteRepository, WriteStorage};
|
||||||
use crate::{identity, storage};
|
use crate::{identity, storage};
|
||||||
|
|
||||||
/// Name of the radicle storage remote.
|
/// Name of the Radicle storage remote.
|
||||||
pub static REMOTE_NAME: LazyLock<git::fmt::RefString> = LazyLock::new(|| git::fmt::refname!("rad"));
|
pub static REMOTE_NAME: LazyLock<git::fmt::RefString> = LazyLock::new(|| git::fmt::refname!("rad"));
|
||||||
/// Name of the radicle storage remote.
|
/// Name of the Radicle storage remote.
|
||||||
pub static REMOTE_COMPONENT: LazyLock<git::fmt::Component> =
|
pub static REMOTE_COMPONENT: LazyLock<git::fmt::Component> =
|
||||||
LazyLock::new(|| git::fmt::component!("rad"));
|
LazyLock::new(|| git::fmt::component!("rad"));
|
||||||
/// Refname used for pushing patches.
|
/// Refname used for pushing patches.
|
||||||
|
|
@ -45,7 +45,7 @@ pub enum InitError {
|
||||||
Storage(#[from] storage::Error),
|
Storage(#[from] storage::Error),
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Initialize a new radicle project from a git repository.
|
/// Initialize a new Radicle project from a git repository.
|
||||||
pub fn init<G, S>(
|
pub fn init<G, S>(
|
||||||
repo: &git::raw::Repository,
|
repo: &git::raw::Repository,
|
||||||
name: ProjectName,
|
name: ProjectName,
|
||||||
|
|
@ -272,7 +272,7 @@ pub fn checkout<P: AsRef<Path>, S: storage::ReadStorage>(
|
||||||
let repo = git::raw::Repository::init_opts(path.as_ref(), &opts)?;
|
let repo = git::raw::Repository::init_opts(path.as_ref(), &opts)?;
|
||||||
let url = git::Url::from(proj);
|
let url = git::Url::from(proj);
|
||||||
|
|
||||||
// Configure repository for radicle.
|
// Configure repository for Radicle.
|
||||||
git::configure_repository(&repo)?;
|
git::configure_repository(&repo)?;
|
||||||
// Configure and fetch all refs from remote.
|
// Configure and fetch all refs from remote.
|
||||||
git::configure_remote(
|
git::configure_remote(
|
||||||
|
|
@ -350,7 +350,7 @@ pub enum RemoteError {
|
||||||
RidMismatch { found: RepoId, expected: RepoId },
|
RidMismatch { found: RepoId, expected: RepoId },
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get the radicle ("rad") remote of a repository, and return the associated project id.
|
/// Get the Radicle ("rad") remote of a repository, and return the associated project id.
|
||||||
pub fn remote(repo: &git::raw::Repository) -> Result<(git::raw::Remote<'_>, RepoId), RemoteError> {
|
pub fn remote(repo: &git::raw::Repository) -> Result<(git::raw::Remote<'_>, RepoId), RemoteError> {
|
||||||
let remote = repo.find_remote(&REMOTE_NAME).map_err(|e| {
|
let remote = repo.find_remote(&REMOTE_NAME).map_err(|e| {
|
||||||
if e.code() == git::raw::ErrorCode::NotFound {
|
if e.code() == git::raw::ErrorCode::NotFound {
|
||||||
|
|
@ -365,7 +365,7 @@ pub fn remote(repo: &git::raw::Repository) -> Result<(git::raw::Remote<'_>, Repo
|
||||||
Ok((remote, url.repo))
|
Ok((remote, url.repo))
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Delete the radicle ("rad") remote of a repository.
|
/// Delete the Radicle ("rad") remote of a repository.
|
||||||
pub fn remove_remote(repo: &git::raw::Repository) -> Result<(), RemoteError> {
|
pub fn remove_remote(repo: &git::raw::Repository) -> Result<(), RemoteError> {
|
||||||
repo.remote_delete(&REMOTE_NAME).map_err(|e| {
|
repo.remote_delete(&REMOTE_NAME).map_err(|e| {
|
||||||
if e.code() == git::raw::ErrorCode::NotFound {
|
if e.code() == git::raw::ErrorCode::NotFound {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
//! Git sub-transport used for fetching radicle data.
|
//! Git sub-transport used for fetching Radicle data.
|
||||||
pub mod mock;
|
pub mod mock;
|
||||||
pub mod url;
|
pub mod url;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ use crate::storage::git::Storage;
|
||||||
use crate::storage::git::transport;
|
use crate::storage::git::transport;
|
||||||
use crate::storage::refs::SignedRefs;
|
use crate::storage::refs::SignedRefs;
|
||||||
|
|
||||||
/// The birth of the radicle project, January 1st, 2018.
|
/// The birth of the Radicle project, January 1st, 2018.
|
||||||
pub const RADICLE_EPOCH: i64 = 1514817556;
|
pub const RADICLE_EPOCH: i64 = 1514817556;
|
||||||
|
|
||||||
const USER_NAME: &str = "anonymous";
|
const USER_NAME: &str = "anonymous";
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue