upleb.uk

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

summaryrefslogtreecommitdiff
path: root/src/bin/git_remote_nostr
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/git_remote_nostr')
-rw-r--r--src/bin/git_remote_nostr/main.rs12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/bin/git_remote_nostr/main.rs b/src/bin/git_remote_nostr/main.rs
index 54fb7cf..8e12d68 100644
--- a/src/bin/git_remote_nostr/main.rs
+++ b/src/bin/git_remote_nostr/main.rs
@@ -43,10 +43,10 @@ async fn main() -> Result<()> {
43 client.set_signer(signer).await; 43 client.set_signer(signer).await;
44 } 44 }
45 45
46 fetching_with_report_for_helper(git_repo_path, &client, &decoded_nostr_url.coordinates).await?; 46 fetching_with_report_for_helper(git_repo_path, &client, &decoded_nostr_url.coordinate).await?;
47 47
48 let repo_ref = 48 let repo_ref =
49 get_repo_ref_from_cache(Some(git_repo_path), &decoded_nostr_url.coordinates).await?; 49 get_repo_ref_from_cache(Some(git_repo_path), &decoded_nostr_url.coordinate).await?;
50 50
51 let stdin = io::stdin(); 51 let stdin = io::stdin();
52 let mut line = String::new(); 52 let mut line = String::new();
@@ -148,12 +148,16 @@ fn process_args() -> Result<Option<(NostrUrlDecoded, Repo)>> {
148async fn fetching_with_report_for_helper( 148async fn fetching_with_report_for_helper(
149 git_repo_path: &Path, 149 git_repo_path: &Path,
150 client: &Client, 150 client: &Client,
151 repo_coordinates: &HashSet<Coordinate>, 151 trusted_maintainer_coordinate: &Coordinate,
152) -> Result<()> { 152) -> Result<()> {
153 let term = console::Term::stderr(); 153 let term = console::Term::stderr();
154 term.write_line("nostr: fetching...")?; 154 term.write_line("nostr: fetching...")?;
155 let (relay_reports, progress_reporter) = client 155 let (relay_reports, progress_reporter) = client
156 .fetch_all(Some(git_repo_path), repo_coordinates, &HashSet::new()) 156 .fetch_all(
157 Some(git_repo_path),
158 Some(trusted_maintainer_coordinate),
159 &HashSet::new(),
160 )
157 .await?; 161 .await?;
158 if !relay_reports.iter().any(std::result::Result::is_err) { 162 if !relay_reports.iter().any(std::result::Result::is_err) {
159 let _ = progress_reporter.clear(); 163 let _ = progress_reporter.clear();