From 6e7e7bd3497d2a77fda34e27f65955b8ac09b3be Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Fri, 6 Sep 2024 10:45:21 +0100 Subject: fix(remote): `list` apply protocols selection used in fetch and tweak the error reporting --- src/bin/git_remote_nostr/main.rs | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'src/bin/git_remote_nostr/main.rs') diff --git a/src/bin/git_remote_nostr/main.rs b/src/bin/git_remote_nostr/main.rs index a3fc5f8..e2738d2 100644 --- a/src/bin/git_remote_nostr/main.rs +++ b/src/bin/git_remote_nostr/main.rs @@ -75,13 +75,21 @@ async fn main() -> Result<()> { println!("unsupported"); } ["fetch", oid, refstr] => { - fetch::run_fetch(&git_repo, &repo_ref, &decoded_nostr_url, &stdin, oid, refstr).await?; + fetch::run_fetch( + &git_repo, + &repo_ref, + &decoded_nostr_url, + &stdin, + oid, + refstr, + ) + .await?; } ["push", refspec] => { push::run_push( &git_repo, &repo_ref, - nostr_remote_url, + &decoded_nostr_url, &stdin, refspec, &client, @@ -90,10 +98,12 @@ async fn main() -> Result<()> { .await?; } ["list"] => { - list_outputs = Some(list::run_list(&git_repo, &repo_ref, false).await?); + list_outputs = + Some(list::run_list(&git_repo, &repo_ref, &decoded_nostr_url, false).await?); } ["list", "for-push"] => { - list_outputs = Some(list::run_list(&git_repo, &repo_ref, true).await?); + list_outputs = + Some(list::run_list(&git_repo, &repo_ref, &decoded_nostr_url, true).await?); } [] => { return Ok(()); -- cgit v1.2.3