diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2025-11-13 17:18:35 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2025-11-13 22:08:56 +0000 |
| commit | 82c7a95f6e9aa266d2f0d2035a0ce4f1715b62ad (patch) | |
| tree | 9de47f91a6157f9361b2bf28618d89873a55227a /src/bin/git_remote_nostr/push.rs | |
| parent | ebab8d2aa487d1814e802c5a51b19d4bb1592e01 (diff) | |
feat(list): make list async and include sync report inline
copy relay fetching approach to async and reporting
Diffstat (limited to 'src/bin/git_remote_nostr/push.rs')
| -rw-r--r-- | src/bin/git_remote_nostr/push.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/bin/git_remote_nostr/push.rs b/src/bin/git_remote_nostr/push.rs index 12350e7..9cf2c52 100644 --- a/src/bin/git_remote_nostr/push.rs +++ b/src/bin/git_remote_nostr/push.rs | |||
| @@ -69,14 +69,18 @@ pub async fn run_push( | |||
| 69 | 69 | ||
| 70 | let term = console::Term::stderr(); | 70 | let term = console::Term::stderr(); |
| 71 | 71 | ||
| 72 | let list_outputs = list_outputs.unwrap_or_else(|| { | 72 | let list_outputs = if let Some(outputs) = list_outputs { |
| 73 | outputs | ||
| 74 | } else { | ||
| 73 | list_from_remotes( | 75 | list_from_remotes( |
| 74 | &term, | 76 | &term, |
| 75 | git_repo, | 77 | git_repo, |
| 76 | &repo_ref.git_server, | 78 | &repo_ref.git_server, |
| 77 | &repo_ref.to_nostr_git_url(&None), | 79 | &repo_ref.to_nostr_git_url(&None), |
| 80 | None, | ||
| 78 | ) | 81 | ) |
| 79 | }); | 82 | .await |
| 83 | }; | ||
| 80 | 84 | ||
| 81 | let existing_state = { | 85 | let existing_state = { |
| 82 | // if no state events - create from first git server listed | 86 | // if no state events - create from first git server listed |