diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2024-09-06 10:45:21 +0100 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2024-09-06 11:05:11 +0100 |
| commit | 6e7e7bd3497d2a77fda34e27f65955b8ac09b3be (patch) | |
| tree | 7d36f9feb568e63823e017b85d5a84443b1bb20c /src/bin/git_remote_nostr/main.rs | |
| parent | 935bc0ca630d7964082966e4c0caeb255f5a4f57 (diff) | |
fix(remote): `list` apply protocols selection
used in fetch and tweak the error reporting
Diffstat (limited to 'src/bin/git_remote_nostr/main.rs')
| -rw-r--r-- | src/bin/git_remote_nostr/main.rs | 18 |
1 files changed, 14 insertions, 4 deletions
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<()> { | |||
| 75 | println!("unsupported"); | 75 | println!("unsupported"); |
| 76 | } | 76 | } |
| 77 | ["fetch", oid, refstr] => { | 77 | ["fetch", oid, refstr] => { |
| 78 | fetch::run_fetch(&git_repo, &repo_ref, &decoded_nostr_url, &stdin, oid, refstr).await?; | 78 | fetch::run_fetch( |
| 79 | &git_repo, | ||
| 80 | &repo_ref, | ||
| 81 | &decoded_nostr_url, | ||
| 82 | &stdin, | ||
| 83 | oid, | ||
| 84 | refstr, | ||
| 85 | ) | ||
| 86 | .await?; | ||
| 79 | } | 87 | } |
| 80 | ["push", refspec] => { | 88 | ["push", refspec] => { |
| 81 | push::run_push( | 89 | push::run_push( |
| 82 | &git_repo, | 90 | &git_repo, |
| 83 | &repo_ref, | 91 | &repo_ref, |
| 84 | nostr_remote_url, | 92 | &decoded_nostr_url, |
| 85 | &stdin, | 93 | &stdin, |
| 86 | refspec, | 94 | refspec, |
| 87 | &client, | 95 | &client, |
| @@ -90,10 +98,12 @@ async fn main() -> Result<()> { | |||
| 90 | .await?; | 98 | .await?; |
| 91 | } | 99 | } |
| 92 | ["list"] => { | 100 | ["list"] => { |
| 93 | list_outputs = Some(list::run_list(&git_repo, &repo_ref, false).await?); | 101 | list_outputs = |
| 102 | Some(list::run_list(&git_repo, &repo_ref, &decoded_nostr_url, false).await?); | ||
| 94 | } | 103 | } |
| 95 | ["list", "for-push"] => { | 104 | ["list", "for-push"] => { |
| 96 | list_outputs = Some(list::run_list(&git_repo, &repo_ref, true).await?); | 105 | list_outputs = |
| 106 | Some(list::run_list(&git_repo, &repo_ref, &decoded_nostr_url, true).await?); | ||
| 97 | } | 107 | } |
| 98 | [] => { | 108 | [] => { |
| 99 | return Ok(()); | 109 | return Ok(()); |