upleb.uk

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

summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2026-02-13 17:51:52 +0000
committerDanConwayDev <DanConwayDev@protonmail.com>2026-02-13 17:51:52 +0000
commitb8716ed849952dd3d230a4a396fc925dc64b451d (patch)
tree5abb0b419625ccd5325cbc9ce6e3bb66983928ba /src
parent4303f9f23f69555f306758fb8920cf4069420a76 (diff)
fix: preserve progress bars on relay errors during clone
fetching_with_report_for_helper unconditionally cleared the progress reporter, wiping error bars that showed relay timeouts. Only clear when all relays succeeded (or in verbose mode where bars were always visible), matching the pattern in fetching_with_report.
Diffstat (limited to 'src')
-rw-r--r--src/bin/git_remote_nostr/main.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/bin/git_remote_nostr/main.rs b/src/bin/git_remote_nostr/main.rs
index 3663d5b..41164fe 100644
--- a/src/bin/git_remote_nostr/main.rs
+++ b/src/bin/git_remote_nostr/main.rs
@@ -167,6 +167,7 @@ async fn fetching_with_report_for_helper(
167 &HashSet::new(), 167 &HashSet::new(),
168 ) 168 )
169 .await?; 169 .await?;
170 let has_errors = relay_reports.iter().any(std::result::Result::is_err);
170 let report = consolidate_fetch_reports(relay_reports); 171 let report = consolidate_fetch_reports(relay_reports);
171 if report.to_string().is_empty() { 172 if report.to_string().is_empty() {
172 if verbose { 173 if verbose {
@@ -175,6 +176,8 @@ async fn fetching_with_report_for_helper(
175 } else { 176 } else {
176 term.write_line(&format!("nostr updates: {report}"))?; 177 term.write_line(&format!("nostr updates: {report}"))?;
177 } 178 }
178 let _ = progress_reporter.clear(); 179 if !has_errors || verbose {
180 let _ = progress_reporter.clear();
181 }
179 Ok(()) 182 Ok(())
180} 183}