upleb.uk

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

summaryrefslogtreecommitdiff
path: root/src/sub_commands/fetch.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/sub_commands/fetch.rs')
-rw-r--r--src/sub_commands/fetch.rs13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/sub_commands/fetch.rs b/src/sub_commands/fetch.rs
index 28eb960..ab6e0fc 100644
--- a/src/sub_commands/fetch.rs
+++ b/src/sub_commands/fetch.rs
@@ -9,7 +9,7 @@ use crate::client::Client;
9#[cfg(test)] 9#[cfg(test)]
10use crate::client::MockConnect; 10use crate::client::MockConnect;
11use crate::{ 11use crate::{
12 client::{consolidate_fetch_reports, Connect}, 12 client::{fetching_with_report, Connect},
13 git::{Repo, RepoActions}, 13 git::{Repo, RepoActions},
14 repo_ref::get_repo_coordinates, 14 repo_ref::get_repo_coordinates,
15 Cli, 15 Cli,
@@ -38,16 +38,7 @@ pub async fn launch(args: &Cli, command_args: &SubCommandArgs) -> Result<()> {
38 } 38 }
39 repo_coordinates 39 repo_coordinates
40 }; 40 };
41 println!("fetching updates..."); 41 fetching_with_report(git_repo.get_path()?, &client, &repo_coordinates).await?;
42 let (relay_reports, _) = client
43 .fetch_all(git_repo.get_path()?, &repo_coordinates, &HashSet::new())
44 .await?;
45 let report = consolidate_fetch_reports(relay_reports);
46 if report.to_string().is_empty() {
47 println!("no updates");
48 } else {
49 println!("updates: {report}");
50 }
51 client.disconnect().await?; 42 client.disconnect().await?;
52 Ok(()) 43 Ok(())
53} 44}