upleb.uk

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

summaryrefslogtreecommitdiff
path: root/src/sub_commands/push.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/sub_commands/push.rs')
-rw-r--r--src/sub_commands/push.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/sub_commands/push.rs b/src/sub_commands/push.rs
index d05158f..9af8b40 100644
--- a/src/sub_commands/push.rs
+++ b/src/sub_commands/push.rs
@@ -16,7 +16,7 @@ use crate::{
16 get_most_recent_patch_with_ancestors, get_proposals_and_revisions_from_cache, 16 get_most_recent_patch_with_ancestors, get_proposals_and_revisions_from_cache,
17 tag_value, 17 tag_value,
18 }, 18 },
19 send::{event_to_cover_letter, generate_patch_event, send_events}, 19 send::{event_is_revision_root, event_to_cover_letter, generate_patch_event, send_events},
20 }, 20 },
21 Cli, 21 Cli,
22}; 22};
@@ -66,7 +66,11 @@ pub async fn launch(cli_args: &Cli, args: &SubCommandArgs) -> Result<()> {
66 get_proposals_and_revisions_from_cache(git_repo_path, repo_ref.coordinates()) 66 get_proposals_and_revisions_from_cache(git_repo_path, repo_ref.coordinates())
67 .await? 67 .await?
68 .iter() 68 .iter()
69 .find(|e| event_to_cover_letter(e).is_ok_and(|cl| cl.branch_name.eq(&branch_name))) 69 .find(|e| {
70 event_to_cover_letter(e)
71 .is_ok_and(|cl| cl.get_branch_name().is_ok_and(|s| s.eq(&branch_name)))
72 && !event_is_revision_root(e)
73 })
70 .context("cannot find proposal that matches the current branch name")? 74 .context("cannot find proposal that matches the current branch name")?
71 .clone(); 75 .clone();
72 76