From 89c51886afd54afd901995916909ba98e764b23e Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Thu, 22 Feb 2024 16:27:18 +0000 Subject: refactor: fix spelling ammended should read amended --- src/git.rs | 2 +- src/main.rs | 2 +- src/sub_commands/list.rs | 14 +++++++------- src/sub_commands/pull.rs | 14 +++++++------- 4 files changed, 16 insertions(+), 16 deletions(-) (limited to 'src') diff --git a/src/git.rs b/src/git.rs index b44390b..73d9446 100644 --- a/src/git.rs +++ b/src/git.rs @@ -632,7 +632,7 @@ fn validate_patch_applied(git_repo: &Repo, patch: &nostr::Event) -> Result<()> { None, None, ) - .context("cannot ammend commit to produce new oid")?; + .context("cannot amend commit to produce new oid")?; // replace the commit with the wrong oid with the newly created one with the // correct oid git_repo diff --git a/src/main.rs b/src/main.rs index f60edd8..9b9b660 100644 --- a/src/main.rs +++ b/src/main.rs @@ -39,7 +39,7 @@ enum Commands { Send(sub_commands::send::SubCommandArgs), /// list proposals; optionally apply them as a new branch List(sub_commands::list::SubCommandArgs), - /// send new commits as proposal ammendments + /// send new commits as proposal amendments Push, /// pull latest commits in proposal linked to checked out branch Pull, diff --git a/src/sub_commands/list.rs b/src/sub_commands/list.rs index 7f0622e..666c4bf 100644 --- a/src/sub_commands/list.rs +++ b/src/sub_commands/list.rs @@ -370,7 +370,7 @@ pub async fn launch(_cli_args: &Cli, _args: &SubCommandArgs) -> Result<()> { } // new proposal revision / rebase - // tip of local in proposal history (new, ammended or rebased version but no + // tip of local in proposal history (new, amended or rebased version but no // local changes) if commits_events.iter().any(|patch| { get_commit_id_from_patch(patch) @@ -477,21 +477,21 @@ pub async fn launch(_cli_args: &Cli, _args: &SubCommandArgs) -> Result<()> { }; } - println!("you have an ammended/rebase version the proposal that is unpublished"); - // user probably has a unpublished ammended or rebase version of the latest + println!("you have an amended/rebase version the proposal that is unpublished"); + // user probably has a unpublished amended or rebase version of the latest // proposal version // if tip of proposal commits exist (were once part of branch but have been - // ammended and git clean up job hasn't removed them) + // amended and git clean up job hasn't removed them) if git_repo.does_commit_exist(&proposal_tip.to_string())? { println!( - "you have previously applied the latest version of the proposal ({} ahead {} behind '{main_branch_name}') but your local proposal branch has ammended or rebased it ({} ahead {} behind '{main_branch_name}')", + "you have previously applied the latest version of the proposal ({} ahead {} behind '{main_branch_name}') but your local proposal branch has amended or rebased it ({} ahead {} behind '{main_branch_name}')", most_recent_proposal_patch_chain.len(), proposal_behind_main.len(), local_ahead_of_main.len(), local_beind_main.len(), ); } - // user probably has a unpublished ammended or rebase version of an older + // user probably has a unpublished amended or rebase version of an older // proposal version else { println!( @@ -503,7 +503,7 @@ pub async fn launch(_cli_args: &Cli, _args: &SubCommandArgs) -> Result<()> { ); println!( - "its likely that you have rebased / ammended an old proposal version because git has no record of the latest proposal commit." + "its likely that you have rebased / amended an old proposal version because git has no record of the latest proposal commit." ); println!( "it is possible that you have been working off the latest version and git has delete this commit as part of a clean up" diff --git a/src/sub_commands/pull.rs b/src/sub_commands/pull.rs index 5c8407e..9b74719 100644 --- a/src/sub_commands/pull.rs +++ b/src/sub_commands/pull.rs @@ -142,21 +142,21 @@ pub async fn launch() -> Result<()> { local_ahead_of_proposal.len() ); } else { - println!("you have an ammended/rebase version the proposal that is unpublished"); - // user probably has a unpublished ammended or rebase version of the latest + println!("you have an amended/rebase version the proposal that is unpublished"); + // user probably has a unpublished amended or rebase version of the latest // proposal version // if tip of proposal commits exist (were once part of branch but have been - // ammended and git clean up job hasn't removed them) + // amended and git clean up job hasn't removed them) if git_repo.does_commit_exist(&proposal_tip.to_string())? { println!( - "you have previously applied the latest version of the proposal ({} ahead {} behind '{main_branch_name}') but your local proposal branch has ammended or rebased it ({} ahead {} behind '{main_branch_name}')", + "you have previously applied the latest version of the proposal ({} ahead {} behind '{main_branch_name}') but your local proposal branch has amended or rebased it ({} ahead {} behind '{main_branch_name}')", most_recent_proposal_patch_chain.len(), proposal_behind_main.len(), local_ahead_of_main.len(), local_beind_main.len(), ); } - // user probably has a unpublished ammended or rebase version of an older + // user probably has a unpublished amended or rebase version of an older // proposal version else { println!( @@ -168,7 +168,7 @@ pub async fn launch() -> Result<()> { ); println!( - "its likely that you have rebased / ammended an old proposal version because git has no record of the latest proposal commit." + "its likely that you have rebased / amended an old proposal version because git has no record of the latest proposal commit." ); println!( "it is possible that you have been working off the latest version and git has delete this commit as part of a clean up" @@ -183,7 +183,7 @@ pub async fn launch() -> Result<()> { // TODO: this copy could be refined further based on this: // - amended commits in the proposal // - if local_base eq proposal base - // - ammended an older version of proposal + // - amended an older version of proposal // - if local_base is behind proposal_base // - rebased the proposal // - if local_base is ahead of proposal_base -- cgit v1.2.3