From 5dae2a8b58d81d7ffd1966e0048a76834962376b Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Wed, 29 Apr 2026 07:18:22 -0400 Subject: [PATCH] treewide: Spelling Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- CHANGELOG.md | 4 ++-- RELEASE.md | 6 +++--- build/Dockerfile | 2 +- crates/radicle-cli/examples/git/git-tag.md | 2 +- crates/radicle-cli/examples/jj-init-bare.md | 2 +- crates/radicle-cli/examples/jj-init-colocate.md | 2 +- crates/radicle-cli/examples/rad-clean.md | 2 +- crates/radicle-cli/examples/rad-clone-all.md | 2 +- crates/radicle-cli/examples/rad-config.md | 2 +- crates/radicle-cli/examples/rad-fork.md | 2 +- crates/radicle-cli/examples/rad-id-collaboration.md | 2 +- crates/radicle-cli/examples/rad-patch-jj.md | 2 +- crates/radicle-cli/src/commands/checkout.rs | 6 +++--- crates/radicle-cli/src/commands/cob/args.rs | 2 +- crates/radicle-cli/src/commands/id/args.rs | 2 +- crates/radicle-cli/src/commands/inbox/args.rs | 4 ++-- crates/radicle-cli/src/commands/init.rs | 10 +++++----- crates/radicle-cli/src/commands/init/args.rs | 6 +++--- crates/radicle-cli/src/commands/node/args.rs | 2 +- crates/radicle-cli/src/commands/node/control.rs | 2 +- crates/radicle-cli/src/git.rs | 2 +- crates/radicle-cli/src/project.rs | 8 ++++---- crates/radicle-cli/src/terminal/io.rs | 2 +- crates/radicle-cli/src/terminal/upload_pack.rs | 2 +- crates/radicle-cli/tests/commands.rs | 2 +- crates/radicle-cli/tests/commands/clone.rs | 10 +++++----- crates/radicle-cli/tests/commands/cob.rs | 6 +++--- crates/radicle-cli/tests/commands/policy.rs | 4 ++-- crates/radicle-cli/tests/commands/remote.rs | 2 +- crates/radicle-cli/tests/commands/sigpipe.rs | 2 +- crates/radicle-cli/tests/commands/utility.rs | 2 +- crates/radicle-cli/tests/util/environment.rs | 4 ++-- crates/radicle-fetch/src/stage.rs | 6 +++--- crates/radicle-node/src/runtime/handle.rs | 4 ++-- crates/radicle-node/src/tests.rs | 2 +- crates/radicle-node/src/wire.rs | 6 +++--- crates/radicle-node/src/worker/fetch.rs | 2 +- crates/radicle-protocol/src/deserializer.rs | 2 +- crates/radicle-protocol/src/fetcher/state.rs | 2 +- crates/radicle-protocol/src/service.rs | 12 ++++++------ crates/radicle-protocol/src/service/gossip/store.rs | 2 +- crates/radicle-remote-helper/src/push.rs | 2 +- crates/radicle-remote-helper/src/push/canonical.rs | 2 +- crates/radicle-term/src/ansi/paint.rs | 2 +- crates/radicle-term/src/editor.rs | 2 +- crates/radicle/src/cob/issue/cache.rs | 2 +- crates/radicle/src/cob/op.rs | 2 +- crates/radicle/src/cob/patch.rs | 4 ++-- crates/radicle/src/cob/store.rs | 2 +- crates/radicle/src/cob/thread.rs | 2 +- crates/radicle/src/git/canonical.rs | 2 +- crates/radicle/src/node.rs | 2 +- crates/radicle/src/node/config.rs | 6 +++--- crates/radicle/src/node/events/upload_pack.rs | 4 ++-- crates/radicle/src/node/notifications/schema.sql | 2 +- crates/radicle/src/node/sync/announce.rs | 8 ++++---- crates/radicle/src/node/sync/fetch.rs | 2 +- crates/radicle/src/rad.rs | 6 +++--- crates/radicle/src/storage/refs/sigrefs/read.rs | 4 ++-- crates/radicle/src/test/storage.rs | 2 +- scripts/build-man-pages.sh | 4 ++-- simulation/README.md | 2 +- 62 files changed, 106 insertions(+), 106 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e104a1d1..70305376 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -326,7 +326,7 @@ configured, and removed the IP addresses in favor of the DNS names. ### 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 `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 -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 form where it is presented to the user. This will allow you to be able to copy and paste these identifiers. diff --git a/RELEASE.md b/RELEASE.md index 70978580..b56ac581 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -66,7 +66,7 @@ take some time, so grab a coffee ☕. --- **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 -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. 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 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. These changes may have been made on `master` and back-ported to the diff --git a/build/Dockerfile b/build/Dockerfile index d8dfbcda..38592fff 100644 --- a/build/Dockerfile +++ b/build/Dockerfile @@ -18,7 +18,7 @@ RUN mkdir -p .cargo && cp build/config.toml .cargo/config.toml # Install dependencies. 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" 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 && \ diff --git a/crates/radicle-cli/examples/git/git-tag.md b/crates/radicle-cli/examples/git/git-tag.md index 80b23697..365bda70 100644 --- a/crates/radicle-cli/examples/git/git-tag.md +++ b/crates/radicle-cli/examples/git/git-tag.md @@ -17,7 +17,7 @@ To rad://z42hL2jL4XNk6K8oHQaSWfMgCL7ji/z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkE * [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//tags/* diff --git a/crates/radicle-cli/examples/jj-init-bare.md b/crates/radicle-cli/examples/jj-init-bare.md index 24a3f36e..2832a203 100644 --- a/crates/radicle-cli/examples/jj-init-bare.md +++ b/crates/radicle-cli/examples/jj-init-bare.md @@ -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) $ jj git init --git-repo heartwood heartwood.jj diff --git a/crates/radicle-cli/examples/jj-init-colocate.md b/crates/radicle-cli/examples/jj-init-colocate.md index f66273d5..eebc8571 100644 --- a/crates/radicle-cli/examples/jj-init-colocate.md +++ b/crates/radicle-cli/examples/jj-init-colocate.md @@ -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) $ jj git init --colocate diff --git a/crates/radicle-cli/examples/rad-clean.md b/crates/radicle-cli/examples/rad-clean.md index c5ed2c97..7b6b9ae8 100644 --- a/crates/radicle-cli/examples/rad-clean.md +++ b/crates/radicle-cli/examples/rad-clean.md @@ -58,7 +58,7 @@ Removed z6MknSLrJoTcukLrE435hVNQT4JUhbvWLX4kUzqkEStBU8Vi ✓ 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: ``` ~eve (fail) diff --git a/crates/radicle-cli/examples/rad-clone-all.md b/crates/radicle-cli/examples/rad-clone-all.md index d139b7b5..48bf731e 100644 --- a/crates/radicle-cli/examples/rad-clone-all.md +++ b/crates/radicle-cli/examples/rad-clone-all.md @@ -48,7 +48,7 @@ z6Mkt67GdsW7715MEfRuP4pSZxJRJh6kj6Y48WRqVv4N1tRk       └── 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 diff --git a/crates/radicle-cli/examples/rad-config.md b/crates/radicle-cli/examples/rad-config.md index 416b53d7..307d43bd 100644 --- a/crates/radicle-cli/examples/rad-config.md +++ b/crates/radicle-cli/examples/rad-config.md @@ -625,7 +625,7 @@ $ rad config schema "default": 128 }, "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", "format": "uint", "minimum": 0, diff --git a/crates/radicle-cli/examples/rad-fork.md b/crates/radicle-cli/examples/rad-fork.md index 6ef727ac..3fc0ff63 100644 --- a/crates/radicle-cli/examples/rad-fork.md +++ b/crates/radicle-cli/examples/rad-fork.md @@ -51,5 +51,5 @@ z6Mkt67GdsW7715MEfRuP4pSZxJRJh6kj6Y48WRqVv4N1tRk       └── 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. diff --git a/crates/radicle-cli/examples/rad-id-collaboration.md b/crates/radicle-cli/examples/rad-id-collaboration.md index aaf108d8..f88738a6 100644 --- a/crates/radicle-cli/examples/rad-id-collaboration.md +++ b/crates/radicle-cli/examples/rad-id-collaboration.md @@ -78,7 +78,7 @@ did:key:z6Mkt67GdsW7715MEfRuP4pSZxJRJh6kj6Y48WRqVv4N1tRk (bob) 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 -between Alice and Bob. Eve first needs to setup a fork: +between Alice and Bob. Eve first needs to set up a fork: ``` ~eve $ rad clone rad:z42hL2jL4XNk6K8oHQaSWfMgCL7ji --scope followed diff --git a/crates/radicle-cli/examples/rad-patch-jj.md b/crates/radicle-cli/examples/rad-patch-jj.md index fec39e35..63011bc5 100644 --- a/crates/radicle-cli/examples/rad-patch-jj.md +++ b/crates/radicle-cli/examples/rad-patch-jj.md @@ -33,7 +33,7 @@ As of 2025-05 we can't use `jj` to do push with options directly, see: - - -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. ``` (stderr) diff --git a/crates/radicle-cli/src/commands/checkout.rs b/crates/radicle-cli/src/commands/checkout.rs index 4a907296..0becf7dd 100644 --- a/crates/radicle-cli/src/commands/checkout.rs +++ b/crates/radicle-cli/src/commands/checkout.rs @@ -62,7 +62,7 @@ fn execute(args: Args, profile: &Profile) -> anyhow::Result { .filter(|id| id != profile.id()) .collect::>(); - // Setup remote tracking branches for project delegates. + // Set up remote tracking branches for project delegates. setup_remotes( project::SetupRemote { rid: args.repo, @@ -77,7 +77,7 @@ fn execute(args: Args, profile: &Profile) -> anyhow::Result { 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( setup: project::SetupRemote, remotes: &[NodeId], @@ -93,7 +93,7 @@ pub fn setup_remotes( 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( setup: &project::SetupRemote, remote_id: &NodeId, diff --git a/crates/radicle-cli/src/commands/cob/args.rs b/crates/radicle-cli/src/commands/cob/args.rs index 078ecedf..704bc74f 100644 --- a/crates/radicle-cli/src/commands/cob/args.rs +++ b/crates/radicle-cli/src/commands/cob/args.rs @@ -39,7 +39,7 @@ pub(super) enum Command { /// Print a log of all raw operations on a COB Log { - /// Tepository ID of the repository to operate on + /// Repository ID of the repository to operate on #[arg(long, short, value_name = "RID")] repo: RepoId, diff --git a/crates/radicle-cli/src/commands/id/args.rs b/crates/radicle-cli/src/commands/id/args.rs index d83e6029..82ff0391 100644 --- a/crates/radicle-cli/src/commands/id/args.rs +++ b/crates/radicle-cli/src/commands/id/args.rs @@ -204,7 +204,7 @@ pub(super) enum Command { /// Update the identity by setting metadata in one of the identity payloads /// /// [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`. // - https://github.com/clap-rs/clap/discussions/5930#discussioncomment-12315889 // - https://docs.rs/clap/latest/clap/_derive/index.html#arg-types diff --git a/crates/radicle-cli/src/commands/inbox/args.rs b/crates/radicle-cli/src/commands/inbox/args.rs index 28de59aa..2fe9a9b9 100644 --- a/crates/radicle-cli/src/commands/inbox/args.rs +++ b/crates/radicle-cli/src/commands/inbox/args.rs @@ -200,9 +200,9 @@ impl FromStr for SortBy { pub(super) enum ListMode { /// List the notifications of the current repository, if in a working - /// directory, otherwise all the repositories. + /// directory; otherwise, all the repositories. Contextual, - /// List the notifications for a all repositories. + /// List the notifications for all repositories. All, /// List the notifications for a specific repository. ByRepo(RepoId), diff --git a/crates/radicle-cli/src/commands/init.rs b/crates/radicle-cli/src/commands/init.rs index 33df9c16..cfa5bb78 100644 --- a/crates/radicle-cli/src/commands/init.rs +++ b/crates/radicle-cli/src/commands/init.rs @@ -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() { - // Setup eg. `master` -> `rad/master` + // Setup, e.g. `master` -> `rad/master` radicle::git::set_upstream( &repo, &*radicle::rad::REMOTE_NAME, @@ -181,7 +181,7 @@ pub fn init(repo: git::Repository, args: Args, profile: &profile::Profile) -> an } if args.setup_signing { - // Setup Radicle signing key. + // Set up Radicle signing key. self::setup_signing(profile.id(), &repo, interactive)?; } @@ -244,7 +244,7 @@ pub fn init_existing( )?; if args.set_upstream { - // Setup eg. `master` -> `rad/master` + // Setup, e.g. `master` -> `rad/master` radicle::git::set_upstream( &working, &*radicle::rad::REMOTE_NAME, @@ -254,7 +254,7 @@ pub fn init_existing( } if args.setup_signing { - // Setup Radicle signing key. + // Set up Radicle signing key. self::setup_signing(profile.id(), &working, interactive)?; } @@ -483,7 +483,7 @@ pub fn announce( Ok(()) } -/// Setup Radicle key as commit signing key in repository. +/// Set up Radicle key as commit signing key in repository. pub fn setup_signing( node_id: &NodeId, repo: &git::Repository, diff --git a/crates/radicle-cli/src/commands/init/args.rs b/crates/radicle-cli/src/commands/init/args.rs index fdf10ac5..88831bce 100644 --- a/crates/radicle-cli/src/commands/init/args.rs +++ b/crates/radicle-cli/src/commands/init/args.rs @@ -40,15 +40,15 @@ pub struct Args { /// Set repository visibility to *public* #[arg(long, conflicts_with = "private")] public: bool, - /// Setup repository as an existing Radicle repository + /// Set up repository as an existing Radicle repository /// /// [example values: rad:z3Tr6bC7ctEg2EHmLvknUr29mEDLH, z3Tr6bC7ctEg2EHmLvknUr29mEDLH] #[arg(long, value_name = "RID")] pub(super) existing: Option, - /// Setup the upstream of the default branch + /// Set up the upstream of the default branch #[arg(short = 'u', long)] 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)] pub(super) setup_signing: bool, /// Don't ask for confirmation during setup diff --git a/crates/radicle-cli/src/commands/node/args.rs b/crates/radicle-cli/src/commands/node/args.rs index 155ab360..904fb261 100644 --- a/crates/radicle-cli/src/commands/node/args.rs +++ b/crates/radicle-cli/src/commands/node/args.rs @@ -185,7 +185,7 @@ pub(super) enum Command { /// Show the 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)] only: Option, }, diff --git a/crates/radicle-cli/src/commands/node/control.rs b/crates/radicle-cli/src/commands/node/control.rs index c9fa4cb3..506bac69 100644 --- a/crates/radicle-cli/src/commands/node/control.rs +++ b/crates/radicle-cli/src/commands/node/control.rs @@ -33,7 +33,7 @@ pub fn start( return Ok(()); } 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`. let validator = term::io::PassphraseValidator::new(profile.keystore.clone()); let passphrase = if let Some(phrase) = profile::env::passphrase() { diff --git a/crates/radicle-cli/src/git.rs b/crates/radicle-cli/src/git.rs index 8015bc3d..5d1e329a 100644 --- a/crates/radicle-cli/src/git.rs +++ b/crates/radicle-cli/src/git.rs @@ -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. /// /// > scooby/master...rad/scooby/heads/master diff --git a/crates/radicle-cli/src/project.rs b/crates/radicle-cli/src/project.rs index 9d4cb66b..80b07802 100644 --- a/crates/radicle-cli/src/project.rs +++ b/crates/radicle-cli/src/project.rs @@ -4,15 +4,15 @@ use crate::git; use radicle::git::fmt::RefStr; use radicle::node::NodeId; -/// Setup a repository remote and tracking branch. +/// Set up a repository remote and tracking branch. pub struct SetupRemote<'a> { /// The repository id. 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, /// Whether or not to fetch the remote immediately. 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, } @@ -38,7 +38,7 @@ impl SetupRemote<'_> { if self.fetch { remote.fetch::<&str>(&[], None, None)?; } - // Setup remote-tracking branch. + // Set up remote-tracking branch. if let Some(branch) = &self.tracking { let tracking_branch = remote_name.join(branch); let local_branch = radicle::git::refs::workdir::branch(tracking_branch.as_refstr()); diff --git a/crates/radicle-cli/src/terminal/io.rs b/crates/radicle-cli/src/terminal/io.rs index 3ba25c73..f4425f99 100644 --- a/crates/radicle-cli/src/terminal/io.rs +++ b/crates/radicle-cli/src/terminal/io.rs @@ -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. pub fn signer(profile: &Profile) -> anyhow::Result { match profile.signer() { diff --git a/crates/radicle-cli/src/terminal/upload_pack.rs b/crates/radicle-cli/src/terminal/upload_pack.rs index ab4cf0eb..d92793c4 100644 --- a/crates/radicle-cli/src/terminal/upload_pack.rs +++ b/crates/radicle-cli/src/terminal/upload_pack.rs @@ -9,7 +9,7 @@ pub struct UploadPack { /// Keep track of which remotes are being uploaded to, removing any that /// have completed. remotes: BTreeSet, - /// Keep track of how long we've been transmitting for to calculate + /// Keep track of how long we've been transmitting to calculate /// throughput. timer: Instant, } diff --git a/crates/radicle-cli/tests/commands.rs b/crates/radicle-cli/tests/commands.rs index 853053bc..1403aec8 100644 --- a/crates/radicle-cli/tests/commands.rs +++ b/crates/radicle-cli/tests/commands.rs @@ -100,7 +100,7 @@ fn rad_remote() { let eve = environment.relay("eve"); let home = alice.home.clone(); let rid = RepoId::from_str("z42hL2jL4XNk6K8oHQaSWfMgCL7ji").unwrap(); - // Setup a test repository. + // Set up a test repository. environment.repository(&alice); test( diff --git a/crates/radicle-cli/tests/commands/clone.rs b/crates/radicle-cli/tests/commands/clone.rs index 6938ebcc..8ccee2b8 100644 --- a/crates/radicle-cli/tests/commands/clone.rs +++ b/crates/radicle-cli/tests/commands/clone.rs @@ -20,7 +20,7 @@ fn rad_clone() { let bob = environment.node("bob"); 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 mut alice = alice.spawn(); @@ -40,7 +40,7 @@ fn rad_clone_bare() { let bob = environment.node("bob"); 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 mut alice = alice.spawn(); @@ -60,7 +60,7 @@ fn rad_clone_directory() { let bob = environment.node("bob"); 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 mut alice = alice.spawn(); @@ -86,7 +86,7 @@ fn rad_clone_all() { let bob = environment.node("bob"); let eve = environment.node("eve"); - // Setup a test project. + // Set up a test project. let acme = alice.project("heartwood", "Radicle Heartwood Protocol & Stack"); let mut alice = alice.spawn(); @@ -121,7 +121,7 @@ fn rad_clone_partial_fail() { let mut eve = environment.node("eve"); 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 mut alice = alice.spawn(); diff --git a/crates/radicle-cli/tests/commands/cob.rs b/crates/radicle-cli/tests/commands/cob.rs index df199892..9e9cf4b6 100644 --- a/crates/radicle-cli/tests/commands/cob.rs +++ b/crates/radicle-cli/tests/commands/cob.rs @@ -23,7 +23,7 @@ fn rad_cob_update_identity() { std::fs::create_dir_all(base).unwrap(); std::fs::create_dir_all(working.clone()).unwrap(); - // Setup a test repository. + // Set up a test repository. fixtures::repository(&working); test("examples/rad-init.md", &working, Some(home), []).unwrap(); @@ -61,7 +61,7 @@ fn rad_cob_multiset() { ) .unwrap(); - // Setup a test repository. + // Set up a test repository. fixtures::repository(&working); 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()); // 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)); bob.handle.announce_refs_for(rid, [bob.id]).unwrap(); diff --git a/crates/radicle-cli/tests/commands/policy.rs b/crates/radicle-cli/tests/commands/policy.rs index 5fbd2a76..4458fa9f 100644 --- a/crates/radicle-cli/tests/commands/policy.rs +++ b/crates/radicle-cli/tests/commands/policy.rs @@ -42,7 +42,7 @@ fn rad_unseed() { let mut alice = environment.node("alice"); let working = tempfile::tempdir().unwrap(); - // Setup a test project. + // Set up a test project. alice.project("heartwood", "Radicle Heartwood Protocol & Stack"); let alice = alice.spawn(); @@ -54,7 +54,7 @@ fn rad_unseed_many() { let mut environment = Environment::new(); let mut alice = environment.node("alice"); - // Setup a test project. + // Set up a test project. alice.project("heartwood", "Radicle Heartwood Protocol & Stack"); alice.project("nixpkgs", "Home for Nix Packages"); let alice = alice.spawn(); diff --git a/crates/radicle-cli/tests/commands/remote.rs b/crates/radicle-cli/tests/commands/remote.rs index de68e0c6..68407d33 100644 --- a/crates/radicle-cli/tests/commands/remote.rs +++ b/crates/radicle-cli/tests/commands/remote.rs @@ -14,7 +14,7 @@ fn rad_remote() { let eve = environment.relay("eve"); let home = alice.home.clone(); let rid = RepoId::from_str("z42hL2jL4XNk6K8oHQaSWfMgCL7ji").unwrap(); - // Setup a test repository. + // Set up a test repository. environment.repository(&alice); test( diff --git a/crates/radicle-cli/tests/commands/sigpipe.rs b/crates/radicle-cli/tests/commands/sigpipe.rs index 595204e7..4262a1b2 100644 --- a/crates/radicle-cli/tests/commands/sigpipe.rs +++ b/crates/radicle-cli/tests/commands/sigpipe.rs @@ -6,7 +6,7 @@ //! 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 //! 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]. //! Ignorance in this case means that the signal handler is set to diff --git a/crates/radicle-cli/tests/commands/utility.rs b/crates/radicle-cli/tests/commands/utility.rs index 40cebaa5..3b3c1969 100644 --- a/crates/radicle-cli/tests/commands/utility.rs +++ b/crates/radicle-cli/tests/commands/utility.rs @@ -69,7 +69,7 @@ fn rad_clean() { let eve = environment.node("eve"); let working = environment.tempdir().join("working"); - // Setup a test project. + // Set up a test project. let acme = RepoId::from_str("z42hL2jL4XNk6K8oHQaSWfMgCL7ji").unwrap(); radicle::test::fixtures::repository(working.join("acme")); test( diff --git a/crates/radicle-cli/tests/util/environment.rs b/crates/radicle-cli/tests/util/environment.rs index dbd1b594..f42895b0 100644 --- a/crates/radicle-cli/tests/util/environment.rs +++ b/crates/radicle-cli/tests/util/environment.rs @@ -110,7 +110,7 @@ impl Environment { /// Path to the working directory of the user with the given alias. /// 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 { 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 { self.profile_with(self.config(alias)) } diff --git a/crates/radicle-fetch/src/stage.rs b/crates/radicle-fetch/src/stage.rs index 525934dc..73629c86 100644 --- a/crates/radicle-fetch/src/stage.rs +++ b/crates/radicle-fetch/src/stage.rs @@ -270,7 +270,7 @@ impl ProtocolStage for CanonicalId { let verified = repo .identity_doc_at( *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 { remote: self.remote, @@ -399,7 +399,7 @@ pub struct SigrefsAt { impl ProtocolStage for SigrefsAt { fn ls_refs(&self) -> Option> { // 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( self.refs_at .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`. fn ref_filter(&self, r: Ref) -> Option { let (refname, tip) = refs::unpack_ref(r).ok()?; diff --git a/crates/radicle-node/src/runtime/handle.rs b/crates/radicle-node/src/runtime/handle.rs index 01e182e6..c8ff9a98 100644 --- a/crates/radicle-node/src/runtime/handle.rs +++ b/crates/radicle-node/src/runtime/handle.rs @@ -78,7 +78,7 @@ pub struct Handle { 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, /// Publishes events to subscribers. emitter: Emitter, @@ -353,7 +353,7 @@ impl radicle::node::Handle for Handle { } 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 .shutdown .compare_exchange(false, true, Ordering::SeqCst, Ordering::SeqCst) diff --git a/crates/radicle-node/src/tests.rs b/crates/radicle-node/src/tests.rs index dd19425f..f9a9fac3 100644 --- a/crates/radicle-node/src/tests.rs +++ b/crates/radicle-node/src/tests.rs @@ -2008,7 +2008,7 @@ fn test_announcement_message_amplification() { 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 { continue; } diff --git a/crates/radicle-node/src/wire.rs b/crates/radicle-node/src/wire.rs index 907d1f4c..bebca675 100644 --- a/crates/radicle-node/src/wire.rs +++ b/crates/radicle-node/src/wire.rs @@ -722,7 +722,7 @@ where ChannelsConfig::new(FETCH_TIMEOUT) .with_reader_limit(reader_limit), ) 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; }; @@ -1094,7 +1094,7 @@ pub fn dial>( // In proxy mode, simply use the configured proxy address. // This takes precedence over any global proxy. 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. AddressConfig::Forward => Ok(global_proxy .map(Into::into) @@ -1110,7 +1110,7 @@ pub fn dial>( // Determine what address to establish a TCP connection with, given the remote peer // address and our node configuration. let inet_addr: NetAddr = 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(ip), None) => NetAddr::new(InetHost::Ip(*ip), remote_addr.port), (HostName::Dns(_), Some(proxy)) => proxy.into(), diff --git a/crates/radicle-node/src/worker/fetch.rs b/crates/radicle-node/src/worker/fetch.rs index f143d98d..9e6ab905 100644 --- a/crates/radicle-node/src/worker/fetch.rs +++ b/crates/radicle-node/src/worker/fetch.rs @@ -149,7 +149,7 @@ impl Handle { // Notifications are only posted for pulls, not clones. if let Some(mut store) = notifs { // 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. if repo.remote(&storage.info().key).is_ok() { notify(&rid, &applied, &mut store)?; diff --git a/crates/radicle-protocol/src/deserializer.rs b/crates/radicle-protocol/src/deserializer.rs index 5f74bd43..4081a6aa 100644 --- a/crates/radicle-protocol/src/deserializer.rs +++ b/crates/radicle-protocol/src/deserializer.rs @@ -8,7 +8,7 @@ use crate::wire; /// 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)] pub struct Deserializer { unparsed: BoundedVec, diff --git a/crates/radicle-protocol/src/fetcher/state.rs b/crates/radicle-protocol/src/fetcher/state.rs index e756a227..cc9ad2b2 100644 --- a/crates/radicle-protocol/src/fetcher/state.rs +++ b/crates/radicle-protocol/src/fetcher/state.rs @@ -463,7 +463,7 @@ impl Queue { } /// 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

(&mut self, predicate: P) -> Option where P: FnOnce(&QueuedFetch) -> bool, diff --git a/crates/radicle-protocol/src/service.rs b/crates/radicle-protocol/src/service.rs index db419766..eedb3f5d 100644 --- a/crates/radicle-protocol/src/service.rs +++ b/crates/radicle-protocol/src/service.rs @@ -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, /// when we come online for the first time. 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. pub const SUBSCRIBE_BACKLOG_DELTA: LocalDuration = LocalDuration::from_mins(3); /// Minimum amount of time to wait before reconnecting to a peer. @@ -501,7 +501,7 @@ where .routing_mut() .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()?); // Connect to configured peers. let addrs = self.config.connect.clone(); @@ -648,7 +648,7 @@ where /// Find the closest `n` peers by proximity in seeding graphs. /// 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)] pub fn closest_peers(&self, n: usize) -> Vec { 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) { Ok(Some(id)) => { log::debug!( @@ -1942,7 +1942,7 @@ where let now = self.clock(); 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. // 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. #[derive(Debug)] pub struct Lookup { - /// Whether the project was found locally or not. + /// Whether or not the project was found locally. pub local: Option, /// A list of remote peers on which the project is known to exist. pub remote: Vec, diff --git a/crates/radicle-protocol/src/service/gossip/store.rs b/crates/radicle-protocol/src/service/gossip/store.rs index f0035f9a..914b1b56 100644 --- a/crates/radicle-protocol/src/service/gossip/store.rs +++ b/crates/radicle-protocol/src/service/gossip/store.rs @@ -46,7 +46,7 @@ pub trait Store { ann: &Announcement, ) -> Result, 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>; /// Return messages that should be relayed. diff --git a/crates/radicle-remote-helper/src/push.rs b/crates/radicle-remote-helper/src/push.rs index 0ec93a22..52eb8263 100644 --- a/crates/radicle-remote-helper/src/push.rs +++ b/crates/radicle-remote-helper/src/push.rs @@ -667,7 +667,7 @@ where "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) = rad::setup_patch_upstream(&patch, *head, working, upstream, false)? { diff --git a/crates/radicle-remote-helper/src/push/canonical.rs b/crates/radicle-remote-helper/src/push/canonical.rs index 7f9f3876..63331646 100644 --- a/crates/radicle-remote-helper/src/push/canonical.rs +++ b/crates/radicle-remote-helper/src/push/canonical.rs @@ -31,7 +31,7 @@ where /// 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 - /// 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. /// /// # Errors diff --git a/crates/radicle-term/src/ansi/paint.rs b/crates/radicle-term/src/ansi/paint.rs index dfb22b58..d7579879 100644 --- a/crates/radicle-term/src/ansi/paint.rs +++ b/crates/radicle-term/src/ansi/paint.rs @@ -36,7 +36,7 @@ impl TerminalFile { /// What file is used for text output. 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); /// Whether paint styling should be forced. static FORCED: AtomicBool = AtomicBool::new(false); diff --git a/crates/radicle-term/src/editor.rs b/crates/radicle-term/src/editor.rs index c099f96b..9ddcc33d 100644 --- a/crates/radicle-term/src/editor.rs +++ b/crates/radicle-term/src/editor.rs @@ -136,7 +136,7 @@ impl Editor { { 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 // child exits. diff --git a/crates/radicle/src/cob/issue/cache.rs b/crates/radicle/src/cob/issue/cache.rs index 858a7e24..94617ad9 100644 --- a/crates/radicle/src/cob/issue/cache.rs +++ b/crates/radicle/src/cob/issue/cache.rs @@ -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::Error> { self.list_by_status(&State::Closed { reason: CloseReason::Other, diff --git a/crates/radicle/src/cob/op.rs b/crates/radicle/src/cob/op.rs index e6439ad9..4c49b807 100644 --- a/crates/radicle/src/cob/op.rs +++ b/crates/radicle/src/cob/op.rs @@ -54,7 +54,7 @@ pub enum LoadError { /// Operations are applied to an accumulator to yield a final state. #[derive(Debug, Clone, PartialEq, Eq, Serialize)] pub struct Op { - /// Id of the entry under which this operation lives. + /// ID of the entry under which this operation lives. pub id: EntryId, /// The action carried out by this operation. pub actions: NonEmpty, diff --git a/crates/radicle/src/cob/patch.rs b/crates/radicle/src/cob/patch.rs index b14931dd..3bfe1552 100644 --- a/crates/radicle/src/cob/patch.rs +++ b/crates/radicle/src/cob/patch.rs @@ -809,7 +809,7 @@ impl Patch { // In this case, since there is not enough information to determine // whether the action is authorized or not, we simply ignore it. // 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(()) } } @@ -943,7 +943,7 @@ impl Patch { return Ok(()); }; 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 if let btree_map::Entry::Vacant(e) = rev.reviews.entry(author) { let id = ReviewId(entry); diff --git a/crates/radicle/src/cob/store.rs b/crates/radicle/src/cob/store.rs index f64e1759..57b78da0 100644 --- a/crates/radicle/src/cob/store.rs +++ b/crates/radicle/src/cob/store.rs @@ -520,7 +520,7 @@ where /// Add actions to this transaction. /// 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>(&mut self, actions: I) -> Result<(), Error> { for action in actions { self.push(action)?; diff --git a/crates/radicle/src/cob/thread.rs b/crates/radicle/src/cob/thread.rs index f665f447..d810eedd 100644 --- a/crates/radicle/src/cob/thread.rs +++ b/crates/radicle/src/cob/thread.rs @@ -26,7 +26,7 @@ pub enum Error { /// This error indicates that the operations are not being applied /// 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. #[error("causal dependency {0:?} missing")] Missing(EntryId), diff --git a/crates/radicle/src/git/canonical.rs b/crates/radicle/src/git/canonical.rs index 13af6b49..d94350ed 100644 --- a/crates/radicle/src/git/canonical.rs +++ b/crates/radicle/src/git/canonical.rs @@ -794,7 +794,7 @@ mod tests { // Note for the next two cases we only give enough merge base // 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); cq.found_merge_bases([MergeBase { a: b2.id(), diff --git a/crates/radicle/src/node.rs b/crates/radicle/src/node.rs index 179e540c..cba05a99 100644 --- a/crates/radicle/src/node.rs +++ b/crates/radicle/src/node.rs @@ -1492,7 +1492,7 @@ pub(crate) mod properties { /// the `short` alias, both sets of results will return. For the `long` /// 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) { let (short, short_ids) = short; let (long, long_ids) = long; diff --git a/crates/radicle/src/node/config.rs b/crates/radicle/src/node/config.rs index f856bdd6..774f5dfb 100644 --- a/crates/radicle/src/node/config.rs +++ b/crates/radicle/src/node/config.rs @@ -246,7 +246,7 @@ pub struct ConnectionLimits { /// Max inbound connections. 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, } @@ -671,8 +671,8 @@ impl Config { node::Features::SEED } - /// Return the configured user agent, if set. Otherwise fall back to the - /// unintetesting value `"/radicle/"`. + /// Return the configured user agent, if set. Otherwise, fall back to the + /// uninteresting value `"/radicle/"`. pub fn user_agent(&self) -> UserAgent { match self.user_agent.as_ref() { Some(agent) => agent.clone(), diff --git a/crates/radicle/src/node/events/upload_pack.rs b/crates/radicle/src/node/events/upload_pack.rs index c9d16275..8c1f7726 100644 --- a/crates/radicle/src/node/events/upload_pack.rs +++ b/crates/radicle/src/node/events/upload_pack.rs @@ -16,7 +16,7 @@ pub enum UploadPack { remote: NodeId, /// 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: String, }, @@ -70,7 +70,7 @@ impl UploadPack { /// 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. pub fn done(rid: RepoId, remote: NodeId, status: ExitStatus) -> Self { Self::Done { diff --git a/crates/radicle/src/node/notifications/schema.sql b/crates/radicle/src/node/notifications/schema.sql index 2883f807..06397d67 100644 --- a/crates/radicle/src/node/notifications/schema.sql +++ b/crates/radicle/src/node/notifications/schema.sql @@ -4,7 +4,7 @@ create table if not exists "repository-notifications" ( "repo" text not null, -- Git reference name related to this update. "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, -- Old head of the branch before update (OID or `null`). "old" text, diff --git a/crates/radicle/src/node/sync/announce.rs b/crates/radicle/src/node/sync/announce.rs index de85cdd0..602a961a 100644 --- a/crates/radicle/src/node/sync/announce.rs +++ b/crates/radicle/src/node/sync/announce.rs @@ -125,7 +125,7 @@ impl Announcer { /// Complete the [`Announcer`] process returning a [`AnnouncerResult`]. /// /// 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`]. pub fn timed_out(self) -> AnnouncerResult { match self.is_target_reached() { @@ -144,7 +144,7 @@ impl Announcer { /// Check if the [`Announcer`] can continue synchronizing with more nodes. /// 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`]. // 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, @@ -270,7 +270,7 @@ pub struct 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 /// [`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 /// attempt to synchronize with. diff --git a/crates/radicle/src/node/sync/fetch.rs b/crates/radicle/src/node/sync/fetch.rs index b0335342..ff26c8c7 100644 --- a/crates/radicle/src/node/sync/fetch.rs +++ b/crates/radicle/src/node/sync/fetch.rs @@ -445,7 +445,7 @@ pub struct 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 /// [`PrivateNetwork`]. It is recommended that /// [`FetcherConfig::with_candidates`] is not used to extend the candidate diff --git a/crates/radicle/src/rad.rs b/crates/radicle/src/rad.rs index 47282c67..6e91a762 100644 --- a/crates/radicle/src/rad.rs +++ b/crates/radicle/src/rad.rs @@ -312,7 +312,7 @@ pub fn checkout, S: storage::ReadStorage>( } { - // Setup default branch. + // Set up default branch. let remote_head_ref = git::refs::workdir::remote_branch(&REMOTE_NAME, project.default_branch()); @@ -329,7 +329,7 @@ pub fn checkout, S: storage::ReadStorage>( 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)?; } @@ -457,7 +457,7 @@ pub fn repo_jj_git_root() -> Result { 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>( patch: &ObjectId, patch_head: crate::git::Oid, diff --git a/crates/radicle/src/storage/refs/sigrefs/read.rs b/crates/radicle/src/storage/refs/sigrefs/read.rs index 3b27411a..a22bd370 100644 --- a/crates/radicle/src/storage/refs/sigrefs/read.rs +++ b/crates/radicle/src/storage/refs/sigrefs/read.rs @@ -187,7 +187,7 @@ where // The fact that the parent OID is a hash over all previous history // makes it *incredibly unlikely* or rather *practically impossible* // 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); } @@ -386,7 +386,7 @@ impl Commit { // for `rad/refs/sigrefs-parent` to target. The zero OID would // be a candidate, but it is filtered out in [`Refs`]. // 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. // Pattern 2: diff --git a/crates/radicle/src/test/storage.rs b/crates/radicle/src/test/storage.rs index c32881af..17de8105 100644 --- a/crates/radicle/src/test/storage.rs +++ b/crates/radicle/src/test/storage.rs @@ -22,7 +22,7 @@ pub struct MockStorage { pub info: crate::git::UserInfo, /// 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, } diff --git a/scripts/build-man-pages.sh b/scripts/build-man-pages.sh index 55bcc026..9a949c0b 100755 --- a/scripts/build-man-pages.sh +++ b/scripts/build-man-pages.sh @@ -2,7 +2,7 @@ set -e -# Attempt to install `asciidoctor` on Debian, Arch Linux and MacOS. +# Attempt to install `asciidoctor` on Debian, Arch Linux and macOS. install() { os="$(uname)" @@ -16,7 +16,7 @@ install() { # Arch Linux pacman -Sy --noconfirm asciidoctor fi ;; - Darwin) # MacOS + Darwin) # macOS if command -v brew >/dev/null 2>&1; then brew install asciidoctor fi ;; diff --git a/simulation/README.md b/simulation/README.md index f1e5fba6..9756ed5b 100644 --- a/simulation/README.md +++ b/simulation/README.md @@ -58,7 +58,7 @@ This will give us the following workflow for constructing test scenarios: - [ ] Isolation between simulations and main network. - [ ] 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. - [ ] Invariant assertion across simulation network. - [ ] Teardown and Artifact collection.