upleb.uk

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

summaryrefslogtreecommitdiff
path: root/src/sub_commands
diff options
context:
space:
mode:
Diffstat (limited to 'src/sub_commands')
-rw-r--r--src/sub_commands/pull.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/sub_commands/pull.rs b/src/sub_commands/pull.rs
index 357782a..dfa6f89 100644
--- a/src/sub_commands/pull.rs
+++ b/src/sub_commands/pull.rs
@@ -15,7 +15,7 @@ use crate::{
15 client::{fetching_with_report, get_repo_ref_from_cache}, 15 client::{fetching_with_report, get_repo_ref_from_cache},
16 git::{str_to_sha1, Repo, RepoActions}, 16 git::{str_to_sha1, Repo, RepoActions},
17 repo_ref::get_repo_coordinates, 17 repo_ref::get_repo_coordinates,
18 sub_commands::list::get_most_recent_patch_with_ancestors, 18 sub_commands::{list::get_most_recent_patch_with_ancestors, send::event_is_revision_root},
19}; 19};
20 20
21#[allow(clippy::too_many_lines)] 21#[allow(clippy::too_many_lines)]
@@ -49,10 +49,12 @@ pub async fn launch() -> Result<()> {
49 get_proposals_and_revisions_from_cache(git_repo_path, repo_ref.coordinates()) 49 get_proposals_and_revisions_from_cache(git_repo_path, repo_ref.coordinates())
50 .await? 50 .await?
51 .iter() 51 .iter()
52 .find(|e| event_to_cover_letter(e).is_ok_and(|cl| cl.branch_name.eq(&branch_name))) 52 .find(|e| {
53 event_to_cover_letter(e).is_ok_and(|cl| cl.branch_name.eq(&branch_name))
54 && !event_is_revision_root(e)
55 })
53 .context("cannot find proposal that matches the current branch name")? 56 .context("cannot find proposal that matches the current branch name")?
54 .clone(); 57 .clone();
55
56 let commit_events = get_all_proposal_patch_events_from_cache( 58 let commit_events = get_all_proposal_patch_events_from_cache(
57 git_repo_path, 59 git_repo_path,
58 &repo_ref, 60 &repo_ref,