treewide: Spelling

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
This commit is contained in:
Josh Soref 2026-04-29 07:18:22 -04:00
parent a101705012
commit 5dae2a8b58
62 changed files with 106 additions and 106 deletions

View File

@ -326,7 +326,7 @@ configured, and removed the IP addresses in favor of the DNS names.
### Better Support for Bare Repositories ### Better Support for Bare Repositories
[gitrepostiory-layout]: https://git-scm.com/docs/gitrepository-layout/2.49.0 [gitrepository-layout]: https://git-scm.com/docs/gitrepository-layout/2.49.0
Some improvements to supporting bare repositories have been made for `rad` and Some improvements to supporting bare repositories have been made for `rad` and
`git-remote-rad`. For `rad`, the `rad clone` command has learned a new flag `git-remote-rad`. For `rad`, the `rad clone` command has learned a new flag
@ -560,7 +560,7 @@ continue to look into other fixes required for getting full Windows support.
### Display Full Node IDs ### Display Full Node IDs
Node IDs and and node addresses have improved formatting. The CLI will output Node IDs and node addresses have improved formatting. The CLI will output
shortened forms of NIDs and addresses when the output is transient, and the full shortened forms of NIDs and addresses when the output is transient, and the full
form where it is presented to the user. This will allow you to be able to copy form where it is presented to the user. This will allow you to be able to copy
and paste these identifiers. and paste these identifiers.

View File

@ -66,7 +66,7 @@ take some time, so grab a coffee ☕.
--- ---
**Note**: the script currently outputs warnings about the `strip` command for **Note**: the script currently outputs warnings about the `strip` command for
MacOS builds. These are ok, and can be ignored. macOS builds. These are ok, and can be ignored.
--- ---
@ -194,7 +194,7 @@ script linked to on [Get Started][website].
### Release Branch ### Release Branch
At this point, a release branch should be created. This branch will used for At this point, a release branch should be created. This branch will be used for
*patch releases*, e.g. `1.5.1`, `1.5.2`, etc. *patch releases*, e.g. `1.5.1`, `1.5.2`, etc.
The branch must be named `releases/x.y`, similar to the tagged release, where The branch must be named `releases/x.y`, similar to the tagged release, where
@ -228,7 +228,7 @@ Patch Releases
After the `x.y.0` release is made, it may be beneficial, or even necessary, to After the `x.y.0` release is made, it may be beneficial, or even necessary, to
release patch releases of the binaries. These patch releases must be compatible release patch releases of the binaries. These patch releases must be compatible
with minor version that was released, otherwise the commits should not be with minor version that was released; otherwise, the commits should not be
included. included.
These changes may have been made on `master` and back-ported to the These changes may have been made on `master` and back-ported to the

View File

@ -18,7 +18,7 @@ RUN mkdir -p .cargo && cp build/config.toml .cargo/config.toml
# Install dependencies. # Install dependencies.
RUN apk update && apk add --no-cache git musl-dev xz asciidoctor RUN apk update && apk add --no-cache git musl-dev xz asciidoctor
# Install a pinned zig version with MacOS TBD v4 support # Install a pinned zig version with macOS TBD v4 support
ARG ZIG_VERSION="0.13.0" ARG ZIG_VERSION="0.13.0"
RUN wget -q https://ziglang.org/download/${ZIG_VERSION}/zig-linux-x86_64-${ZIG_VERSION}.tar.xz && \ RUN wget -q https://ziglang.org/download/${ZIG_VERSION}/zig-linux-x86_64-${ZIG_VERSION}.tar.xz && \
tar -xf zig-linux-x86_64-${ZIG_VERSION}.tar.xz && \ tar -xf zig-linux-x86_64-${ZIG_VERSION}.tar.xz && \

View File

@ -17,7 +17,7 @@ To rad://z42hL2jL4XNk6K8oHQaSWfMgCL7ji/z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkE
* [new tag] v1.0 -> v1.0 * [new tag] v1.0 -> v1.0
``` ```
Since the `rad` remote is setup to push `tags` using the refspec: Since the `rad` remote is set up to push `tags` using the refspec:
~~~ ~~~
fetch = +refs/tags/*:refs/remotes/<name>/tags/* fetch = +refs/tags/*:refs/remotes/<name>/tags/*

View File

@ -1,4 +1,4 @@
We initialize Jujutusu for our repository for use with a bare Git repo. We initialize Jujutsu for our repository for use with a bare Git repo.
```(stderr) ```(stderr)
$ jj git init --git-repo heartwood heartwood.jj $ jj git init --git-repo heartwood heartwood.jj

View File

@ -1,4 +1,4 @@
We initialize Jujutusu for our repository by colocating with Git. We initialize Jujutsu for our repository by colocating with Git.
```(stderr) ```(stderr)
$ jj git init --colocate $ jj git init --colocate

View File

@ -58,7 +58,7 @@ Removed z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi
✓ Successfully cleaned rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji ✓ Successfully cleaned rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji
``` ```
And attempting to clean the repository again, or any non-existent And attempting to clean the repository again, or any nonexistent
repository, has no effect on the storage at all: repository, has no effect on the storage at all:
``` ~eve (fail) ``` ~eve (fail)

View File

@ -48,7 +48,7 @@ z6Mkt67GdsW7715MEfRuP4pSZxJRJh6kj6Y48WRqVv4N1tRk
      └── sigrefs       └── sigrefs
``` ```
We can then setup a git remote for `bob`: We can then set up a git remote for `bob`:
``` ```
$ rad remote add z6Mkt67GdsW7715MEfRuP4pSZxJRJh6kj6Y48WRqVv4N1tRk --name bob --no-sync --fetch $ rad remote add z6Mkt67GdsW7715MEfRuP4pSZxJRJh6kj6Y48WRqVv4N1tRk --name bob --no-sync --fetch

View File

@ -625,7 +625,7 @@ $ rad config schema
"default": 128 "default": 128
}, },
"outbound": { "outbound": {
"description": "Max outbound connections. Note that this can be higher than the *target* number.", "description": "Max outbound connections. Note that this can be greater than the *target* number.",
"type": "integer", "type": "integer",
"format": "uint", "format": "uint",
"minimum": 0, "minimum": 0,

View File

@ -51,5 +51,5 @@ z6Mkt67GdsW7715MEfRuP4pSZxJRJh6kj6Y48WRqVv4N1tRk
      └── sigrefs       └── sigrefs
``` ```
We are now able to setup a remote in our own working copy of the We are now able to set up a remote in our own working copy of the
project and push to our own fork. project and push to our own fork.

View File

@ -78,7 +78,7 @@ did:key:z6Mkt67GdsW7715MEfRuP4pSZxJRJh6kj6Y48WRqVv4N1tRk (bob)
Later, Bob meets Eve at a conference and she wants to take part in the Later, Bob meets Eve at a conference and she wants to take part in the
project. For Bob to propose Eve, similar steps need to happen as project. For Bob to propose Eve, similar steps need to happen as
between Alice and Bob. Eve first needs to setup a fork: between Alice and Bob. Eve first needs to set up a fork:
``` ~eve ``` ~eve
$ rad clone rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji --scope followed $ rad clone rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji --scope followed

View File

@ -33,7 +33,7 @@ As of 2025-05 we can't use `jj` to do push with options directly, see:
- <https://github.com/jj-vcs/jj/issues/4075> - <https://github.com/jj-vcs/jj/issues/4075>
- <https://github.com/jj-vcs/jj/pull/2098> - <https://github.com/jj-vcs/jj/pull/2098>
However, since we initialized Jujutusu to colocate with Git, we can just use However, since we initialized Jujutsu to colocate with Git, we can just use
Git to push. Git to push.
``` (stderr) ``` (stderr)

View File

@ -62,7 +62,7 @@ fn execute(args: Args, profile: &Profile) -> anyhow::Result<PathBuf> {
.filter(|id| id != profile.id()) .filter(|id| id != profile.id())
.collect::<Vec<_>>(); .collect::<Vec<_>>();
// Setup remote tracking branches for project delegates. // Set up remote tracking branches for project delegates.
setup_remotes( setup_remotes(
project::SetupRemote { project::SetupRemote {
rid: args.repo, rid: args.repo,
@ -77,7 +77,7 @@ fn execute(args: Args, profile: &Profile) -> anyhow::Result<PathBuf> {
Ok(path) Ok(path)
} }
/// Setup a remote and tracking branch for each given remote. /// Set up a remote and tracking branch for each given remote.
pub fn setup_remotes( pub fn setup_remotes(
setup: project::SetupRemote, setup: project::SetupRemote,
remotes: &[NodeId], remotes: &[NodeId],
@ -93,7 +93,7 @@ pub fn setup_remotes(
Ok(()) Ok(())
} }
/// Setup a remote and tracking branch for the given remote. /// Set up a remote and tracking branch for the given remote.
pub fn setup_remote( pub fn setup_remote(
setup: &project::SetupRemote, setup: &project::SetupRemote,
remote_id: &NodeId, remote_id: &NodeId,

View File

@ -39,7 +39,7 @@ pub(super) enum Command {
/// Print a log of all raw operations on a COB /// Print a log of all raw operations on a COB
Log { Log {
/// Tepository ID of the repository to operate on /// Repository ID of the repository to operate on
#[arg(long, short, value_name = "RID")] #[arg(long, short, value_name = "RID")]
repo: RepoId, repo: RepoId,

View File

@ -204,7 +204,7 @@ pub(super) enum Command {
/// Update the identity by setting metadata in one of the identity payloads /// Update the identity by setting metadata in one of the identity payloads
/// ///
/// [example values: xyz.radicle.project name '"radicle-example"'] /// [example values: xyz.radicle.project name '"radicle-example"']
// TODO(erikili:) Value parsers do not operate on series of values, yet. This will // TODO(erikli:) Value parsers do not operate on series of values, yet. This will
// change with clap v5, so we can hopefully use `Vec<Payload>`. // change with clap v5, so we can hopefully use `Vec<Payload>`.
// - https://github.com/clap-rs/clap/discussions/5930#discussioncomment-12315889 // - https://github.com/clap-rs/clap/discussions/5930#discussioncomment-12315889
// - https://docs.rs/clap/latest/clap/_derive/index.html#arg-types // - https://docs.rs/clap/latest/clap/_derive/index.html#arg-types

View File

@ -200,9 +200,9 @@ impl FromStr for SortBy {
pub(super) enum ListMode { pub(super) enum ListMode {
/// List the notifications of the current repository, if in a working /// List the notifications of the current repository, if in a working
/// directory, otherwise all the repositories. /// directory; otherwise, all the repositories.
Contextual, Contextual,
/// List the notifications for a all repositories. /// List the notifications for all repositories.
All, All,
/// List the notifications for a specific repository. /// List the notifications for a specific repository.
ByRepo(RepoId), ByRepo(RepoId),

View File

@ -169,7 +169,7 @@ pub fn init(repo: git::Repository, args: Args, profile: &profile::Profile) -> an
} }
if args.set_upstream || git::branch_remote(&repo, proj.default_branch()).is_err() { if args.set_upstream || git::branch_remote(&repo, proj.default_branch()).is_err() {
// Setup eg. `master` -> `rad/master` // Setup, e.g. `master` -> `rad/master`
radicle::git::set_upstream( radicle::git::set_upstream(
&repo, &repo,
&*radicle::rad::REMOTE_NAME, &*radicle::rad::REMOTE_NAME,
@ -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. // Set up Radicle signing key.
self::setup_signing(profile.id(), &repo, interactive)?; self::setup_signing(profile.id(), &repo, interactive)?;
} }
@ -244,7 +244,7 @@ pub fn init_existing(
)?; )?;
if args.set_upstream { if args.set_upstream {
// Setup eg. `master` -> `rad/master` // Setup, e.g. `master` -> `rad/master`
radicle::git::set_upstream( radicle::git::set_upstream(
&working, &working,
&*radicle::rad::REMOTE_NAME, &*radicle::rad::REMOTE_NAME,
@ -254,7 +254,7 @@ pub fn init_existing(
} }
if args.setup_signing { if args.setup_signing {
// Setup Radicle signing key. // Set up 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. /// Set up 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,

View File

@ -40,15 +40,15 @@ pub struct Args {
/// Set repository visibility to *public* /// Set repository visibility to *public*
#[arg(long, conflicts_with = "private")] #[arg(long, conflicts_with = "private")]
public: bool, public: bool,
/// Setup repository as an existing Radicle repository /// Set up repository as an existing Radicle repository
/// ///
/// [example values: rad:z3Tr6bC7ctEg2EHmLvknUr29mEDLH, z3Tr6bC7ctEg2EHmLvknUr29mEDLH] /// [example values: rad:z3Tr6bC7ctEg2EHmLvknUr29mEDLH, z3Tr6bC7ctEg2EHmLvknUr29mEDLH]
#[arg(long, value_name = "RID")] #[arg(long, value_name = "RID")]
pub(super) existing: Option<RepoId>, pub(super) existing: Option<RepoId>,
/// Setup the upstream of the default branch /// Set up 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 /// Set up 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

View File

@ -185,7 +185,7 @@ pub(super) enum Command {
/// Show the status /// Show the status
Status { Status {
/// If node is running, only print the Node ID and exit, otherwise exit with a non-zero exit status. /// If node is running, only print the Node ID and exit; otherwise, exit with a non-zero exit status.
#[arg(long, value_parser = OnlyParser)] #[arg(long, value_parser = OnlyParser)]
only: Option<Only>, only: Option<Only>,
}, },

View File

@ -33,7 +33,7 @@ pub fn start(
return Ok(()); return Ok(());
} }
let envs = if profile.keystore.is_encrypted()? { let envs = if profile.keystore.is_encrypted()? {
// Ask passphrase here, otherwise it'll be a fatal error when running the daemon // Ask passphrase here; otherwise, it'll be a fatal error when running the daemon
// without `RAD_PASSPHRASE`. // without `RAD_PASSPHRASE`.
let validator = term::io::PassphraseValidator::new(profile.keystore.clone()); let validator = term::io::PassphraseValidator::new(profile.keystore.clone());
let passphrase = if let Some(phrase) = profile::env::passphrase() { let passphrase = if let Some(phrase) = profile::env::passphrase() {

View File

@ -306,7 +306,7 @@ pub fn remove_remote(repo: &Repository, rid: &RepoId) -> anyhow::Result<()> {
} }
} }
/// Setup an upstream tracking branch for the given remote and branch. /// Set up an upstream tracking branch for the given remote and branch.
/// Creates the tracking branch if it does not exist. /// Creates the tracking branch if it does not exist.
/// ///
/// > scooby/master...rad/scooby/heads/master /// > scooby/master...rad/scooby/heads/master

View File

@ -4,15 +4,15 @@ use crate::git;
use radicle::git::fmt::RefStr; use radicle::git::fmt::RefStr;
use radicle::node::NodeId; use radicle::node::NodeId;
/// Setup a repository remote and tracking branch. /// Set up a repository remote and tracking branch.
pub struct SetupRemote<'a> { pub struct SetupRemote<'a> {
/// The repository id. /// The repository id.
pub rid: RepoId, pub rid: RepoId,
/// Whether or not to setup a remote tracking branch. /// Whether or not to set up a remote tracking branch.
pub tracking: Option<BranchName>, pub tracking: Option<BranchName>,
/// Whether or not to fetch the remote immediately. /// Whether or not to fetch the remote immediately.
pub fetch: bool, pub fetch: bool,
/// The repository in which to setup the remote. /// The repository in which to set up the remote.
pub repo: &'a git::Repository, pub repo: &'a git::Repository,
} }
@ -38,7 +38,7 @@ impl SetupRemote<'_> {
if self.fetch { if self.fetch {
remote.fetch::<&str>(&[], None, None)?; remote.fetch::<&str>(&[], None, None)?;
} }
// Setup remote-tracking branch. // Set up remote-tracking branch.
if let Some(branch) = &self.tracking { if let Some(branch) = &self.tracking {
let tracking_branch = remote_name.join(branch); let tracking_branch = remote_name.join(branch);
let local_branch = radicle::git::refs::workdir::branch(tracking_branch.as_refstr()); let local_branch = radicle::git::refs::workdir::branch(tracking_branch.as_refstr());

View File

@ -43,7 +43,7 @@ impl inquire::validator::StringValidator for PassphraseValidator {
} }
} }
/// Get the signer. First we try getting it from ssh-agent, otherwise we prompt the user, /// Get the signer. First we try getting it from ssh-agent; otherwise, we prompt the user,
/// if we're connected to a TTY. /// if we're connected to a TTY.
pub fn signer(profile: &Profile) -> anyhow::Result<BoxedDevice> { pub fn signer(profile: &Profile) -> anyhow::Result<BoxedDevice> {
match profile.signer() { match profile.signer() {

View File

@ -9,7 +9,7 @@ pub struct UploadPack {
/// Keep track of which remotes are being uploaded to, removing any that /// Keep track of which remotes are being uploaded to, removing any that
/// have completed. /// have completed.
remotes: BTreeSet<NodeId>, remotes: BTreeSet<NodeId>,
/// Keep track of how long we've been transmitting for to calculate /// Keep track of how long we've been transmitting to calculate
/// throughput. /// throughput.
timer: Instant, timer: Instant,
} }

View File

@ -100,7 +100,7 @@ fn rad_remote() {
let eve = environment.relay("eve"); let eve = environment.relay("eve");
let home = alice.home.clone(); let home = alice.home.clone();
let rid = RepoId::from_str("z42hL2jL4XNk6K8oHQaSWfMgCL7ji").unwrap(); let rid = RepoId::from_str("z42hL2jL4XNk6K8oHQaSWfMgCL7ji").unwrap();
// Setup a test repository. // Set up a test repository.
environment.repository(&alice); environment.repository(&alice);
test( test(

View File

@ -20,7 +20,7 @@ fn rad_clone() {
let bob = environment.node("bob"); let bob = environment.node("bob");
let working = environment.tempdir().join("working"); let working = environment.tempdir().join("working");
// Setup a test project. // Set up a test project.
let acme = alice.project("heartwood", "Radicle Heartwood Protocol & Stack"); let acme = alice.project("heartwood", "Radicle Heartwood Protocol & Stack");
let mut alice = alice.spawn(); let mut alice = alice.spawn();
@ -40,7 +40,7 @@ fn rad_clone_bare() {
let bob = environment.node("bob"); let bob = environment.node("bob");
let working = environment.tempdir().join("working"); let working = environment.tempdir().join("working");
// Setup a test project. // Set up a test project.
let acme = alice.project("heartwood", "Radicle Heartwood Protocol & Stack"); let acme = alice.project("heartwood", "Radicle Heartwood Protocol & Stack");
let mut alice = alice.spawn(); let mut alice = alice.spawn();
@ -60,7 +60,7 @@ fn rad_clone_directory() {
let bob = environment.node("bob"); let bob = environment.node("bob");
let working = environment.tempdir().join("working"); let working = environment.tempdir().join("working");
// Setup a test project. // Set up a test project.
let acme = alice.project("heartwood", "Radicle Heartwood Protocol & Stack"); let acme = alice.project("heartwood", "Radicle Heartwood Protocol & Stack");
let mut alice = alice.spawn(); let mut alice = alice.spawn();
@ -86,7 +86,7 @@ fn rad_clone_all() {
let bob = environment.node("bob"); let bob = environment.node("bob");
let eve = environment.node("eve"); let eve = environment.node("eve");
// Setup a test project. // Set up a test project.
let acme = alice.project("heartwood", "Radicle Heartwood Protocol & Stack"); let acme = alice.project("heartwood", "Radicle Heartwood Protocol & Stack");
let mut alice = alice.spawn(); let mut alice = alice.spawn();
@ -121,7 +121,7 @@ fn rad_clone_partial_fail() {
let mut eve = environment.node("eve"); let mut eve = environment.node("eve");
let carol = NodeId::from_str("z6MksFqXN3Yhqk8pTJdUGLwBTkRfQvwZXPqR2qMEhbS9wzpT").unwrap(); let carol = NodeId::from_str("z6MksFqXN3Yhqk8pTJdUGLwBTkRfQvwZXPqR2qMEhbS9wzpT").unwrap();
// Setup a test project. // Set up a test project.
let acme = alice.project("heartwood", "Radicle Heartwood Protocol & Stack"); let acme = alice.project("heartwood", "Radicle Heartwood Protocol & Stack");
let mut alice = alice.spawn(); let mut alice = alice.spawn();

View File

@ -23,7 +23,7 @@ fn rad_cob_update_identity() {
std::fs::create_dir_all(base).unwrap(); std::fs::create_dir_all(base).unwrap();
std::fs::create_dir_all(working.clone()).unwrap(); std::fs::create_dir_all(working.clone()).unwrap();
// Setup a test repository. // Set up a test repository.
fixtures::repository(&working); fixtures::repository(&working);
test("examples/rad-init.md", &working, Some(home), []).unwrap(); test("examples/rad-init.md", &working, Some(home), []).unwrap();
@ -61,7 +61,7 @@ fn rad_cob_multiset() {
) )
.unwrap(); .unwrap();
// Setup a test repository. // Set up a test repository.
fixtures::repository(&working); fixtures::repository(&working);
test("examples/rad-init.md", &working, Some(home), []).unwrap(); test("examples/rad-init.md", &working, Some(home), []).unwrap();
@ -152,7 +152,7 @@ fn test_cob_replication() {
log::debug!(target: "test", "Issue {} created", issue.id()); log::debug!(target: "test", "Issue {} created", issue.id());
// Make sure that Bob's issue refs announcement has a different timestamp than his fork's // Make sure that Bob's issue refs announcement has a different timestamp than his fork's
// announcement, otherwise Alice will consider it stale. // announcement; otherwise, Alice will consider it stale.
std::thread::sleep(std::time::Duration::from_millis(3)); std::thread::sleep(std::time::Duration::from_millis(3));
bob.handle.announce_refs_for(rid, [bob.id]).unwrap(); bob.handle.announce_refs_for(rid, [bob.id]).unwrap();

View File

@ -42,7 +42,7 @@ fn rad_unseed() {
let mut alice = environment.node("alice"); let mut alice = environment.node("alice");
let working = tempfile::tempdir().unwrap(); let working = tempfile::tempdir().unwrap();
// Setup a test project. // Set up a test project.
alice.project("heartwood", "Radicle Heartwood Protocol & Stack"); alice.project("heartwood", "Radicle Heartwood Protocol & Stack");
let alice = alice.spawn(); let alice = alice.spawn();
@ -54,7 +54,7 @@ fn rad_unseed_many() {
let mut environment = Environment::new(); let mut environment = Environment::new();
let mut alice = environment.node("alice"); let mut alice = environment.node("alice");
// Setup a test project. // Set up a test project.
alice.project("heartwood", "Radicle Heartwood Protocol & Stack"); alice.project("heartwood", "Radicle Heartwood Protocol & Stack");
alice.project("nixpkgs", "Home for Nix Packages"); alice.project("nixpkgs", "Home for Nix Packages");
let alice = alice.spawn(); let alice = alice.spawn();

View File

@ -14,7 +14,7 @@ fn rad_remote() {
let eve = environment.relay("eve"); let eve = environment.relay("eve");
let home = alice.home.clone(); let home = alice.home.clone();
let rid = RepoId::from_str("z42hL2jL4XNk6K8oHQaSWfMgCL7ji").unwrap(); let rid = RepoId::from_str("z42hL2jL4XNk6K8oHQaSWfMgCL7ji").unwrap();
// Setup a test repository. // Set up a test repository.
environment.repository(&alice); environment.repository(&alice);
test( test(

View File

@ -6,7 +6,7 @@
//! is not handled by the process, i.e., no signal handler is installed. //! is not handled by the process, i.e., no signal handler is installed.
//! The default behaviour in this case is to terminate the process with an //! The default behaviour in this case is to terminate the process with an
//! exit code of 141 (128 + 13). Such lack of a signal handler is also //! exit code of 141 (128 + 13). Such lack of a signal handler is also
//! indidcated by `SIG_DFL`. //! indicated by `SIG_DFL`.
//! //!
//! Rust (since 1.62) ignores `SIGPIPE` by default, see [issue #6529]. //! Rust (since 1.62) ignores `SIGPIPE` by default, see [issue #6529].
//! Ignorance in this case means that the signal handler is set to //! Ignorance in this case means that the signal handler is set to

View File

@ -69,7 +69,7 @@ fn rad_clean() {
let eve = environment.node("eve"); let eve = environment.node("eve");
let working = environment.tempdir().join("working"); let working = environment.tempdir().join("working");
// Setup a test project. // Set up a test project.
let acme = RepoId::from_str("z42hL2jL4XNk6K8oHQaSWfMgCL7ji").unwrap(); let acme = RepoId::from_str("z42hL2jL4XNk6K8oHQaSWfMgCL7ji").unwrap();
radicle::test::fixtures::repository(working.join("acme")); radicle::test::fixtures::repository(working.join("acme"));
test( test(

View File

@ -110,7 +110,7 @@ impl Environment {
/// Path to the working directory of the user with the given alias. /// Path to the working directory of the user with the given alias.
/// Tests that need to act on multiple repositories should crate /// Tests that need to act on multiple repositories should crate
/// subdirecories within this directory. /// subdirectories within this directory.
pub fn work(&self, has_alias: &impl HasAlias) -> PathBuf { pub fn work(&self, has_alias: &impl HasAlias) -> PathBuf {
self.unix_home(has_alias).join("work") self.unix_home(has_alias).join("work")
} }
@ -185,7 +185,7 @@ impl Environment {
} }
} }
/// Create a new profile using a the default configuration from [`Environment::config`]. /// Create a new profile using the default configuration from [`Environment::config`].
pub fn profile(&mut self, alias: &'static str) -> Profile { pub fn profile(&mut self, alias: &'static str) -> Profile {
self.profile_with(self.config(alias)) self.profile_with(self.config(alias))
} }

View File

@ -270,7 +270,7 @@ impl ProtocolStage for CanonicalId {
let verified = repo let verified = repo
.identity_doc_at( .identity_doc_at(
*s.canonical_rad_id() *s.canonical_rad_id()
.expect("ensure we got canonicdal 'rad/id' ref"), .expect("ensure we got canonical 'rad/id' ref"),
) )
.map_err(|err| error::Prepare::Verification { .map_err(|err| error::Prepare::Verification {
remote: self.remote, remote: self.remote,
@ -399,7 +399,7 @@ pub struct SigrefsAt {
impl ProtocolStage for SigrefsAt { impl ProtocolStage for SigrefsAt {
fn ls_refs(&self) -> Option<NonEmpty<RefPrefix>> { fn ls_refs(&self) -> Option<NonEmpty<RefPrefix>> {
// N.b. the `Oid`s are known but the `rad/sigrefs` are still // N.b. the `Oid`s are known but the `rad/sigrefs` are still
// asked for to mark them for updating the fetch state. // requested to mark them for updating the fetch state.
NonEmpty::collect( NonEmpty::collect(
self.refs_at self.refs_at
.iter() .iter()
@ -409,7 +409,7 @@ impl ProtocolStage for SigrefsAt {
) )
} }
// We only asked for `rad/sigrefs` so we should only get // We only requested `rad/sigrefs` so we should only get
// `rad/sigrefs`. // `rad/sigrefs`.
fn ref_filter(&self, r: Ref) -> Option<ReceivedRef> { fn ref_filter(&self, r: Ref) -> Option<ReceivedRef> {
let (refname, tip) = refs::unpack_ref(r).ok()?; let (refname, tip) = refs::unpack_ref(r).ok()?;

View File

@ -78,7 +78,7 @@ pub struct Handle {
pub(crate) controller: reactor::Controller, pub(crate) controller: reactor::Controller,
/// Whether a shutdown was initiated or not. Prevents attempting to shutdown twice. /// Whether or not a shutdown was initiated. Prevents attempting to shutdown twice.
shutdown: Arc<AtomicBool>, shutdown: Arc<AtomicBool>,
/// Publishes events to subscribers. /// Publishes events to subscribers.
emitter: Emitter<Event>, emitter: Emitter<Event>,
@ -353,7 +353,7 @@ impl radicle::node::Handle for Handle {
} }
fn shutdown(self) -> Result<(), Error> { fn shutdown(self) -> Result<(), Error> {
// If the current value is `false`, set it to `true`, otherwise error. // If the current value is `false`, set it to `true`; otherwise, error.
if self if self
.shutdown .shutdown
.compare_exchange(false, true, Ordering::SeqCst, Ordering::SeqCst) .compare_exchange(false, true, Ordering::SeqCst, Ordering::SeqCst)

View File

@ -2008,7 +2008,7 @@ fn test_announcement_message_amplification() {
s.elapsed() < LocalDuration::from_mins(3) s.elapsed() < LocalDuration::from_mins(3)
}); });
// Ensure nodes are all connected, otherwise skip this test run. // Ensure nodes are all connected; otherwise, skip this test run.
if alice.sessions().connected().count() != 4 { if alice.sessions().connected().count() != 4 {
continue; continue;
} }

View File

@ -722,7 +722,7 @@ where
ChannelsConfig::new(FETCH_TIMEOUT) ChannelsConfig::new(FETCH_TIMEOUT)
.with_reader_limit(reader_limit), .with_reader_limit(reader_limit),
) else { ) else {
log::debug!(target: "wire", "Peer attempted to open already-open stream stream {stream}"); log::debug!(target: "wire", "Peer attempted to open already-open stream {stream}");
continue; continue;
}; };
@ -1094,7 +1094,7 @@ pub fn dial<G: Ecdh<Pk = NodeId>>(
// In proxy mode, simply use the configured proxy address. // In proxy mode, simply use the configured proxy address.
// This takes precedence over any global proxy. // This takes precedence over any global proxy.
AddressConfig::Proxy { address } => Ok((*address).into()), AddressConfig::Proxy { address } => Ok((*address).into()),
// In "forward" mode, if a global proxy is set, we use that, otherwise // In "forward" mode, if a global proxy is set, we use that; otherwise,
// we treat the address as a regular DNS name. // we treat the address as a regular DNS name.
AddressConfig::Forward => Ok(global_proxy AddressConfig::Forward => Ok(global_proxy
.map(Into::into) .map(Into::into)
@ -1110,7 +1110,7 @@ pub fn dial<G: Ecdh<Pk = NodeId>>(
// Determine what address to establish a TCP connection with, given the remote peer // Determine what address to establish a TCP connection with, given the remote peer
// address and our node configuration. // address and our node configuration.
let inet_addr: NetAddr<InetHost> = match (&remote_addr.host, config.proxy) { let inet_addr: NetAddr<InetHost> = match (&remote_addr.host, config.proxy) {
// For IP and DNS addresses, use the global proxy if set, otherwise use the address as-is. // For IP and DNS addresses, use the global proxy if set; otherwise, use the address as-is.
(HostName::Ip(_), Some(proxy)) => proxy.into(), (HostName::Ip(_), Some(proxy)) => proxy.into(),
(HostName::Ip(ip), None) => NetAddr::new(InetHost::Ip(*ip), remote_addr.port), (HostName::Ip(ip), None) => NetAddr::new(InetHost::Ip(*ip), remote_addr.port),
(HostName::Dns(_), Some(proxy)) => proxy.into(), (HostName::Dns(_), Some(proxy)) => proxy.into(),

View File

@ -149,7 +149,7 @@ impl Handle {
// Notifications are only posted for pulls, not clones. // Notifications are only posted for pulls, not clones.
if let Some(mut store) = notifs { if let Some(mut store) = notifs {
// Only create notifications for repos that we have // Only create notifications for repos that we have
// contributed to in some way, otherwise our inbox will // contributed to in some way; otherwise, our inbox will
// be flooded by all the repos we are seeding. // be flooded by all the repos we are seeding.
if repo.remote(&storage.info().key).is_ok() { if repo.remote(&storage.info().key).is_ok() {
notify(&rid, &applied, &mut store)?; notify(&rid, &applied, &mut store)?;

View File

@ -8,7 +8,7 @@ use crate::wire;
/// Message stream deserializer. /// Message stream deserializer.
/// ///
/// Used to for example turn a byte stream into network messages. /// Used, for example, to turn a byte stream into network messages.
#[derive(Debug)] #[derive(Debug)]
pub struct Deserializer<const B: usize, D = Message> { pub struct Deserializer<const B: usize, D = Message> {
unparsed: BoundedVec<u8, B>, unparsed: BoundedVec<u8, B>,

View File

@ -463,7 +463,7 @@ impl Queue {
} }
/// Try to dequeue the next [`QueuedFetch`], but only if the `predicate` /// Try to dequeue the next [`QueuedFetch`], but only if the `predicate`
/// holds, otherwise it will be pushed back to the front of the queue. /// holds; otherwise, it will be pushed back to the front of the queue.
pub(super) fn try_dequeue<P>(&mut self, predicate: P) -> Option<QueuedFetch> pub(super) fn try_dequeue<P>(&mut self, predicate: P) -> Option<QueuedFetch>
where where
P: FnOnce(&QueuedFetch) -> bool, P: FnOnce(&QueuedFetch) -> bool,

View File

@ -100,7 +100,7 @@ pub const MAX_CONNECTION_ATTEMPTS: usize = 3;
/// How far back from the present time should we request gossip messages when connecting to a peer, /// How far back from the present time should we request gossip messages when connecting to a peer,
/// when we come online for the first time. /// when we come online for the first time.
pub const INITIAL_SUBSCRIBE_BACKLOG_DELTA: LocalDuration = LocalDuration::from_mins(60 * 24); pub const INITIAL_SUBSCRIBE_BACKLOG_DELTA: LocalDuration = LocalDuration::from_mins(60 * 24);
/// When subscribing, what margin of error do we give ourselves. A igher delta means we ask for /// When subscribing, what margin of error do we give ourselves. A greater delta means we ask for
/// messages further back than strictly necessary, to account for missed messages. /// messages further back than strictly necessary, to account for missed messages.
pub const SUBSCRIBE_BACKLOG_DELTA: LocalDuration = LocalDuration::from_mins(3); pub const SUBSCRIBE_BACKLOG_DELTA: LocalDuration = LocalDuration::from_mins(3);
/// Minimum amount of time to wait before reconnecting to a peer. /// Minimum amount of time to wait before reconnecting to a peer.
@ -501,7 +501,7 @@ where
.routing_mut() .routing_mut()
.remove_inventories(private.iter(), &nid)?; .remove_inventories(private.iter(), &nid)?;
// Setup subscription filter for seeded repos. // Set up subscription filter for seeded repos.
self.filter = Filter::allowed_by(self.policies.seed_policies()?); self.filter = Filter::allowed_by(self.policies.seed_policies()?);
// Connect to configured peers. // Connect to configured peers.
let addrs = self.config.connect.clone(); let addrs = self.config.connect.clone();
@ -648,7 +648,7 @@ where
/// Find the closest `n` peers by proximity in seeding graphs. /// Find the closest `n` peers by proximity in seeding graphs.
/// Returns a sorted list from the closest peer to the furthest. /// Returns a sorted list from the closest peer to the furthest.
/// Peers with more seedings in common score score higher. /// Peers with more seedings in common score higher.
#[allow(unused)] #[allow(unused)]
pub fn closest_peers(&self, n: usize) -> Vec<NodeId> { pub fn closest_peers(&self, n: usize) -> Vec<NodeId> {
todo!() todo!()
@ -1489,7 +1489,7 @@ where
} }
} }
// Discard announcement messages we've already seen, otherwise update our last seen time. // Discard announcement messages we've already seen; otherwise, update our last seen time.
let relay = match self.db.gossip_mut().announced(announcer, announcement) { let relay = match self.db.gossip_mut().announced(announcer, announcement) {
Ok(Some(id)) => { Ok(Some(id)) => {
log::debug!( log::debug!(
@ -1942,7 +1942,7 @@ where
let now = self.clock(); let now = self.clock();
let filter = self.filter(); let filter = self.filter();
// TODO: Only subscribe to outbound connections, otherwise we will consume too // TODO: Only subscribe to outbound connections; otherwise, we will consume too
// much bandwidth. // much bandwidth.
// If we've been previously connected to the network, we'll have received gossip messages. // If we've been previously connected to the network, we'll have received gossip messages.
@ -2806,7 +2806,7 @@ impl fmt::Display for DisconnectReason {
/// Result of a project lookup. /// Result of a project lookup.
#[derive(Debug)] #[derive(Debug)]
pub struct Lookup { pub struct Lookup {
/// Whether the project was found locally or not. /// Whether or not the project was found locally.
pub local: Option<Doc>, pub local: Option<Doc>,
/// A list of remote peers on which the project is known to exist. /// A list of remote peers on which the project is known to exist.
pub remote: Vec<NodeId>, pub remote: Vec<NodeId>,

View File

@ -46,7 +46,7 @@ pub trait Store {
ann: &Announcement, ann: &Announcement,
) -> Result<Option<AnnouncementId>, Error>; ) -> Result<Option<AnnouncementId>, Error>;
/// Set whether a message should be relayed or not. /// Set whether or not a message should be relayed.
fn set_relay(&mut self, id: AnnouncementId, relay: RelayStatus) -> Result<(), Error>; fn set_relay(&mut self, id: AnnouncementId, relay: RelayStatus) -> Result<(), Error>;
/// Return messages that should be relayed. /// Return messages that should be relayed.

View File

@ -667,7 +667,7 @@ where
"to update, run `git push {upstream} {local_branch}`" "to update, run `git push {upstream} {local_branch}`"
)); ));
} }
// Setup current branch so that pushing updates the patch. // Set up current branch so that pushing updates the patch.
else if let Some(branch) = else if let Some(branch) =
rad::setup_patch_upstream(&patch, *head, working, upstream, false)? rad::setup_patch_upstream(&patch, *head, working, upstream, false)?
{ {

View File

@ -31,7 +31,7 @@ where
/// with the set of commits of the other [`Did`]s. /// with the set of commits of the other [`Did`]s.
/// ///
/// If a quorum is found, then it is also ensured that the new head commit /// If a quorum is found, then it is also ensured that the new head commit
/// is a descendant of the current canonical commit, otherwise the commits /// is a descendant of the current canonical commit; otherwise, the commits
/// are considered diverging. /// are considered diverging.
/// ///
/// # Errors /// # Errors

View File

@ -36,7 +36,7 @@ impl TerminalFile {
/// What file is used for text output. /// What file is used for text output.
static TERMINAL: AtomicI32 = AtomicI32::new(TerminalFile::Stdout as i32); static TERMINAL: AtomicI32 = AtomicI32::new(TerminalFile::Stdout as i32);
/// Whether paint styling is enabled or not. /// Whether or not paint styling is enabled.
static ENABLED: AtomicBool = AtomicBool::new(true); static ENABLED: AtomicBool = AtomicBool::new(true);
/// Whether paint styling should be forced. /// Whether paint styling should be forced.
static FORCED: AtomicBool = AtomicBool::new(false); static FORCED: AtomicBool = AtomicBool::new(false);

View File

@ -136,7 +136,7 @@ impl Editor {
{ {
use std::os::fd::{AsRawFd as _, FromRawFd as _}; use std::os::fd::{AsRawFd as _, FromRawFd as _};
// We duplicate the stderr file descriptor to pass it to the child process, otherwise, if // We duplicate the stderr file descriptor to pass it to the child process; otherwise, if
// we simply pass the `RawFd` of our stderr, `Command` will close our stderr when the // we simply pass the `RawFd` of our stderr, `Command` will close our stderr when the
// child exits. // child exits.

View File

@ -52,7 +52,7 @@ pub trait Issues {
}) })
} }
/// List all closed issues with `CloseReasion::Other` in the store. /// List all closed issues with `CloseReason::Other` in the store.
fn closed(&self) -> Result<Self::Iter<'_>, Self::Error> { fn closed(&self) -> Result<Self::Iter<'_>, Self::Error> {
self.list_by_status(&State::Closed { self.list_by_status(&State::Closed {
reason: CloseReason::Other, reason: CloseReason::Other,

View File

@ -54,7 +54,7 @@ pub enum LoadError {
/// Operations are applied to an accumulator to yield a final state. /// Operations are applied to an accumulator to yield a final state.
#[derive(Debug, Clone, PartialEq, Eq, Serialize)] #[derive(Debug, Clone, PartialEq, Eq, Serialize)]
pub struct Op<A> { pub struct Op<A> {
/// Id of the entry under which this operation lives. /// ID of the entry under which this operation lives.
pub id: EntryId, pub id: EntryId,
/// The action carried out by this operation. /// The action carried out by this operation.
pub actions: NonEmpty<A>, pub actions: NonEmpty<A>,

View File

@ -809,7 +809,7 @@ impl Patch {
// In this case, since there is not enough information to determine // In this case, since there is not enough information to determine
// whether the action is authorized or not, we simply ignore it. // whether the action is authorized or not, we simply ignore it.
// It's likely that the target object was redacted, and we can't // It's likely that the target object was redacted, and we can't
// verify whether the action would have been allowed or not. // verify whether or not the action would have been allowed.
Ok(()) Ok(())
} }
} }
@ -943,7 +943,7 @@ impl Patch {
return Ok(()); return Ok(());
}; };
if let Some(rev) = rev { if let Some(rev) = rev {
// Insert a review if there isn't already one. Otherwise we just ignore // Insert a review if there isn't already one. Otherwise, we just ignore
// this operation // this operation
if let btree_map::Entry::Vacant(e) = rev.reviews.entry(author) { if let btree_map::Entry::Vacant(e) = rev.reviews.entry(author) {
let id = ReviewId(entry); let id = ReviewId(entry);

View File

@ -520,7 +520,7 @@ where
/// Add actions to this transaction. /// Add actions to this transaction.
/// Note that we cannot implement [`std::iter::Extend`] because [`Self::push`] /// Note that we cannot implement [`std::iter::Extend`] because [`Self::push`]
/// validates the action being pushed, and therefore is falliable. /// validates the action being pushed, and therefore is fallible.
pub fn extend<I: IntoIterator<Item = T::Action>>(&mut self, actions: I) -> Result<(), Error> { pub fn extend<I: IntoIterator<Item = T::Action>>(&mut self, actions: I) -> Result<(), Error> {
for action in actions { for action in actions {
self.push(action)?; self.push(action)?;

View File

@ -26,7 +26,7 @@ pub enum Error {
/// This error indicates that the operations are not being applied /// This error indicates that the operations are not being applied
/// in causal order, which is a requirement for this CRDT. /// in causal order, which is a requirement for this CRDT.
/// ///
/// For example, this can occur if an operation references anothern operation /// For example, this can occur if an operation references another operation
/// that hasn't happened yet. /// that hasn't happened yet.
#[error("causal dependency {0:?} missing")] #[error("causal dependency {0:?} missing")]
Missing(EntryId), Missing(EntryId),

View File

@ -794,7 +794,7 @@ mod tests {
// Note for the next two cases we only give enough merge base // Note for the next two cases we only give enough merge base
// information so that the quorum fails. If we provided all // information so that the quorum fails. If we provided all
// `merge_bases`, it would mean that c0 could be chosen as the quourum. // `merge_bases`, it would mean that c0 could be chosen as the quorum.
let mut cq = CommitQuorum::new([c2, b2].iter(), 2); let mut cq = CommitQuorum::new([c2, b2].iter(), 2);
cq.found_merge_bases([MergeBase { cq.found_merge_bases([MergeBase {
a: b2.id(), a: b2.id(),

View File

@ -1492,7 +1492,7 @@ pub(crate) mod properties {
/// the `short` alias, both sets of results will return. For the `long` /// the `short` alias, both sets of results will return. For the `long`
/// alias, only its results will return. /// alias, only its results will return.
/// ///
/// It is also expected that the lookup is case insensitive. /// It is also expected that the lookup is case-insensitive.
pub fn test_reverse_lookup(store: &impl AliasStore, AliasInput { short, long }: AliasInput) { pub fn test_reverse_lookup(store: &impl AliasStore, AliasInput { short, long }: AliasInput) {
let (short, short_ids) = short; let (short, short_ids) = short;
let (long, long_ids) = long; let (long, long_ids) = long;

View File

@ -246,7 +246,7 @@ pub struct ConnectionLimits {
/// Max inbound connections. /// Max inbound connections.
pub inbound: LimitConnectionsInbound, pub inbound: LimitConnectionsInbound,
/// Max outbound connections. Note that this can be higher than the *target* number. /// Max outbound connections. Note that this can be greater than the *target* number.
pub outbound: LimitConnectionsOutbound, pub outbound: LimitConnectionsOutbound,
} }
@ -671,8 +671,8 @@ impl Config {
node::Features::SEED node::Features::SEED
} }
/// Return the configured user agent, if set. Otherwise fall back to the /// Return the configured user agent, if set. Otherwise, fall back to the
/// unintetesting value `"/radicle/"`. /// uninteresting value `"/radicle/"`.
pub fn user_agent(&self) -> UserAgent { pub fn user_agent(&self) -> UserAgent {
match self.user_agent.as_ref() { match self.user_agent.as_ref() {
Some(agent) => agent.clone(), Some(agent) => agent.clone(),

View File

@ -16,7 +16,7 @@ pub enum UploadPack {
remote: NodeId, remote: NodeId,
/// The status code of the upload-pack process. /// The status code of the upload-pack process.
/// ///
/// N.b. `ExitStatus` can not be de/serialized, so the `Display` of the /// N.b. `ExitStatus` cannot be de/serialized, so the `Display` of the
/// status is used instead. /// status is used instead.
status: String, status: String,
}, },
@ -70,7 +70,7 @@ impl UploadPack {
/// Construct a `UploadPack::Done` event. /// Construct a `UploadPack::Done` event.
/// ///
/// If `error` is `None` the process finished successfully, otherwise it /// If `error` is `None` the process finished successfully; otherwise, it
/// finished with an error. /// finished with an error.
pub fn done(rid: RepoId, remote: NodeId, status: ExitStatus) -> Self { pub fn done(rid: RepoId, remote: NodeId, status: ExitStatus) -> Self {
Self::Done { Self::Done {

View File

@ -4,7 +4,7 @@ create table if not exists "repository-notifications" (
"repo" text not null, "repo" text not null,
-- Git reference name related to this update. -- Git reference name related to this update.
"ref" text not null, "ref" text not null,
-- Notification read status. Null if unread, otherwise the time it was read. -- Notification read status. Null if unread; otherwise, the time it was read.
"status" integer default null, "status" integer default null,
-- Old head of the branch before update (OID or `null`). -- Old head of the branch before update (OID or `null`).
"old" text, "old" text,

View File

@ -125,7 +125,7 @@ impl Announcer {
/// Complete the [`Announcer`] process returning a [`AnnouncerResult`]. /// Complete the [`Announcer`] process returning a [`AnnouncerResult`].
/// ///
/// If the target for the [`Announcer`] has been reached, then the result /// If the target for the [`Announcer`] has been reached, then the result
/// will be [`AnnouncerResult::Success`], otherwise, it will be /// will be [`AnnouncerResult::Success`]; otherwise, it will be
/// [`AnnouncerResult::TimedOut`]. /// [`AnnouncerResult::TimedOut`].
pub fn timed_out(self) -> AnnouncerResult { pub fn timed_out(self) -> AnnouncerResult {
match self.is_target_reached() { match self.is_target_reached() {
@ -144,7 +144,7 @@ impl Announcer {
/// Check if the [`Announcer`] can continue synchronizing with more nodes. /// Check if the [`Announcer`] can continue synchronizing with more nodes.
/// If there are no more nodes, then [`NoNodes`] is returned in the /// If there are no more nodes, then [`NoNodes`] is returned in the
/// [`ControlFlow::Break`], otherwise the [`Announcer`] is returned as-is in /// [`ControlFlow::Break`]; otherwise, the [`Announcer`] is returned as-is in
/// the [`ControlFlow::Continue`]. /// the [`ControlFlow::Continue`].
// TODO(finto): I'm not sure this is needed with the change to the target // TODO(finto): I'm not sure this is needed with the change to the target
// logic. Since we can reach the replication factor OR the preferred seeds, // logic. Since we can reach the replication factor OR the preferred seeds,
@ -270,7 +270,7 @@ pub struct AnnouncerConfig {
} }
impl AnnouncerConfig { impl AnnouncerConfig {
/// Setup a private network `AnnouncerConfig`, populating the /// Set up a private network `AnnouncerConfig`, populating the
/// [`AnnouncerConfig`]'s preferred seeds with the allowed set from the /// [`AnnouncerConfig`]'s preferred seeds with the allowed set from the
/// [`PrivateNetwork`]. /// [`PrivateNetwork`].
/// ///
@ -291,7 +291,7 @@ impl AnnouncerConfig {
} }
} }
/// Setup a public `AnnouncerConfig`. /// Set up a public `AnnouncerConfig`.
/// ///
/// `preferred_seeds` is the target set of preferred seeds that [`Announcer`] should /// `preferred_seeds` is the target set of preferred seeds that [`Announcer`] should
/// attempt to synchronize with. /// attempt to synchronize with.

View File

@ -445,7 +445,7 @@ pub struct FetcherConfig {
} }
impl FetcherConfig { impl FetcherConfig {
/// Setup a private network `FetcherConfig`, populating the /// Set up a private network `FetcherConfig`, populating the
/// [`FetcherConfig`]'s seeds with the allowed set from the /// [`FetcherConfig`]'s seeds with the allowed set from the
/// [`PrivateNetwork`]. It is recommended that /// [`PrivateNetwork`]. It is recommended that
/// [`FetcherConfig::with_candidates`] is not used to extend the candidate /// [`FetcherConfig::with_candidates`] is not used to extend the candidate

View File

@ -312,7 +312,7 @@ pub fn checkout<P: AsRef<Path>, S: storage::ReadStorage>(
} }
{ {
// Setup default branch. // Set up default branch.
let remote_head_ref = let remote_head_ref =
git::refs::workdir::remote_branch(&REMOTE_NAME, project.default_branch()); git::refs::workdir::remote_branch(&REMOTE_NAME, project.default_branch());
@ -329,7 +329,7 @@ pub fn checkout<P: AsRef<Path>, S: storage::ReadStorage>(
repo.checkout_head(None)?; repo.checkout_head(None)?;
} }
// Setup remote tracking for default branch. // Set up remote tracking for default branch.
git::set_upstream(&repo, &*REMOTE_NAME, project.default_branch(), branch_ref)?; git::set_upstream(&repo, &*REMOTE_NAME, project.default_branch(), branch_ref)?;
} }
@ -457,7 +457,7 @@ pub fn repo_jj_git_root() -> Result<git::raw::Repository, JujutsuGitRootError> {
Ok(git::raw::Repository::open(path)?) Ok(git::raw::Repository::open(path)?)
} }
/// Setup patch upstream branch such that `git push` updates the patch. /// Set up patch upstream branch such that `git push` updates the patch.
pub fn setup_patch_upstream<'a>( pub fn setup_patch_upstream<'a>(
patch: &ObjectId, patch: &ObjectId,
patch_head: crate::git::Oid, patch_head: crate::git::Oid,

View File

@ -187,7 +187,7 @@ where
// The fact that the parent OID is a hash over all previous history // The fact that the parent OID is a hash over all previous history
// makes it *incredibly unlikely* or rather *practically impossible* // makes it *incredibly unlikely* or rather *practically impossible*
// that the same `/refs` blob re-appears in previous history. // that the same `/refs` blob re-appears in previous history.
// Thus, we can spare oureselves walking the history. // Thus, we can spare ourselves walking the history.
return Ok(head); return Ok(head);
} }
@ -386,7 +386,7 @@ impl Commit {
// for `rad/refs/sigrefs-parent` to target. The zero OID would // for `rad/refs/sigrefs-parent` to target. The zero OID would
// be a candidate, but it is filtered out in [`Refs`]. // be a candidate, but it is filtered out in [`Refs`].
// Upgrading to `FeatureLevel::Parent` is not a good idea // Upgrading to `FeatureLevel::Parent` is not a good idea
// either, otherwise any history containing this commit // either; otherwise, any history containing this commit
// would be at that level from the root onwards. // would be at that level from the root onwards.
// Pattern 2: // Pattern 2:

View File

@ -22,7 +22,7 @@ pub struct MockStorage {
pub info: crate::git::UserInfo, pub info: crate::git::UserInfo,
/// All refs keyed by RID. /// All refs keyed by RID.
/// Each value is a map of refs keyed by node Id (public key). /// Each value is a map of refs keyed by node ID (public key).
pub repos: HashMap<RepoId, MockRepository>, pub repos: HashMap<RepoId, MockRepository>,
} }

View File

@ -2,7 +2,7 @@
set -e set -e
# Attempt to install `asciidoctor` on Debian, Arch Linux and MacOS. # Attempt to install `asciidoctor` on Debian, Arch Linux and macOS.
install() { install() {
os="$(uname)" os="$(uname)"
@ -16,7 +16,7 @@ install() {
# Arch Linux # Arch Linux
pacman -Sy --noconfirm asciidoctor pacman -Sy --noconfirm asciidoctor
fi ;; fi ;;
Darwin) # MacOS Darwin) # macOS
if command -v brew >/dev/null 2>&1; then if command -v brew >/dev/null 2>&1; then
brew install asciidoctor brew install asciidoctor
fi ;; fi ;;

View File

@ -58,7 +58,7 @@ This will give us the following workflow for constructing test scenarios:
- [ ] Isolation between simulations and main network. - [ ] Isolation between simulations and main network.
- [ ] Different node versions within a simulation. - [ ] Different node versions within a simulation.
- [ ] Cross platform ([Windows](https://github.com/dockur/windows), Linux & [MacOS](https://github.com/dockur/macos)). - [ ] Cross platform ([Windows](https://github.com/dockur/windows), Linux & [macOS](https://github.com/dockur/macos)).
- [ ] Realistic load generation. - [ ] Realistic load generation.
- [ ] Invariant assertion across simulation network. - [ ] Invariant assertion across simulation network.
- [ ] Teardown and Artifact collection. - [ ] Teardown and Artifact collection.