upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2024-02-20 12:17:25 +0000
committerDanConwayDev <DanConwayDev@protonmail.com>2024-02-20 12:17:25 +0000
commit570ad62875c191c6bb7809e936a64938eb0fb310 (patch)
tree295f3f1543dc950559297981af4dde3052820de1
parent32a3ca5b3c5fa202ffb6b5670f3aa1e77c331f8d (diff)
refactor: tweak error wording
remove the word nostr for consistency and as its a bit confusing
-rw-r--r--src/sub_commands/push.rs4
-rw-r--r--tests/push.rs4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/sub_commands/push.rs b/src/sub_commands/push.rs
index 0fdd56f..2500e9f 100644
--- a/src/sub_commands/push.rs
+++ b/src/sub_commands/push.rs
@@ -76,14 +76,14 @@ pub async fn launch(cli_args: &Cli) -> Result<()> {
76 .context("latest patch event commit tag isn't a valid SHA1 hash")?; 76 .context("latest patch event commit tag isn't a valid SHA1 hash")?;
77 77
78 if most_recent_patch_commit_id.eq(&branch_tip) { 78 if most_recent_patch_commit_id.eq(&branch_tip) {
79 bail!("nostr proposal already up-to-date with local branch"); 79 bail!("proposal already up-to-date with local branch");
80 } 80 }
81 81
82 if most_recent_proposal_patch_chain.iter().any(|e| { 82 if most_recent_proposal_patch_chain.iter().any(|e| {
83 let c = tag_value(e, "parent-commit").unwrap_or_default(); 83 let c = tag_value(e, "parent-commit").unwrap_or_default();
84 c.eq(&branch_tip.to_string()) 84 c.eq(&branch_tip.to_string())
85 }) { 85 }) {
86 bail!("nostr proposal is ahead of local branch"); 86 bail!("proposal is ahead of local branch");
87 } 87 }
88 88
89 let (ahead, behind) = git_repo 89 let (ahead, behind) = git_repo
diff --git a/tests/push.rs b/tests/push.rs
index 6f3a593..d1ad0e6 100644
--- a/tests/push.rs
+++ b/tests/push.rs
@@ -208,7 +208,7 @@ mod when_branch_is_checked_out {
208 let mut p = CliTester::new_from_dir(&test_repo.dir, ["push"]); 208 let mut p = CliTester::new_from_dir(&test_repo.dir, ["push"]);
209 p.expect("finding proposal root event...\r\n")?; 209 p.expect("finding proposal root event...\r\n")?;
210 p.expect("found proposal root event. finding commits...\r\n")?; 210 p.expect("found proposal root event. finding commits...\r\n")?;
211 p.expect("Error: nostr proposal already up-to-date with local branch\r\n")?; 211 p.expect("Error: proposal already up-to-date with local branch\r\n")?;
212 p.expect_end()?; 212 p.expect_end()?;
213 213
214 for p in [51, 52, 53, 55, 56] { 214 for p in [51, 52, 53, 55, 56] {
@@ -271,7 +271,7 @@ mod when_branch_is_checked_out {
271 let mut p = CliTester::new_from_dir(&test_repo.dir, ["push"]); 271 let mut p = CliTester::new_from_dir(&test_repo.dir, ["push"]);
272 p.expect("finding proposal root event...\r\n")?; 272 p.expect("finding proposal root event...\r\n")?;
273 p.expect("found proposal root event. finding commits...\r\n")?; 273 p.expect("found proposal root event. finding commits...\r\n")?;
274 p.expect("Error: nostr proposal is ahead of local branch\r\n")?; 274 p.expect("Error: proposal is ahead of local branch\r\n")?;
275 p.expect_end()?; 275 p.expect_end()?;
276 276
277 for p in [51, 52, 53, 55, 56] { 277 for p in [51, 52, 53, 55, 56] {