diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2025-05-09 20:00:24 +0100 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2025-05-09 20:00:24 +0100 |
| commit | 38969bbfadf2854f6acb1e515f8f388a01a018c2 (patch) | |
| tree | e5d3758003559bb5f82a4ba6bd455ae18463646c /src/bin/git_remote_nostr/list.rs | |
| parent | 2e5e6a5c860b9bdbd8fa3a495b68a8478fbad4cc (diff) | |
fix: always try git servers over other protocols
remove the code that guessed whether it was an authentication failure
and gave up is it wasn't. this prevents it from trying http for push
when ssh is not supported eg. ngit-relay
Diffstat (limited to 'src/bin/git_remote_nostr/list.rs')
| -rw-r--r-- | src/bin/git_remote_nostr/list.rs | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/bin/git_remote_nostr/list.rs b/src/bin/git_remote_nostr/list.rs index eba573b..2d233ae 100644 --- a/src/bin/git_remote_nostr/list.rs +++ b/src/bin/git_remote_nostr/list.rs | |||
| @@ -22,9 +22,8 @@ use crate::{ | |||
| 22 | fetch::{fetch_from_git_server, make_commits_for_proposal}, | 22 | fetch::{fetch_from_git_server, make_commits_for_proposal}, |
| 23 | git::Repo, | 23 | git::Repo, |
| 24 | utils::{ | 24 | utils::{ |
| 25 | Direction, fetch_or_list_error_is_not_authentication_failure, get_open_or_draft_proposals, | 25 | Direction, get_open_or_draft_proposals, get_read_protocols_to_try, |
| 26 | get_read_protocols_to_try, get_short_git_server_name, join_with_and, | 26 | get_short_git_server_name, join_with_and, set_protocol_preference, |
| 27 | set_protocol_preference, | ||
| 28 | }, | 27 | }, |
| 29 | }; | 28 | }; |
| 30 | 29 | ||
| @@ -244,12 +243,6 @@ pub fn list_from_remote( | |||
| 244 | format!("list: {formatted_url} failed over {protocol}: {error}").as_str(), | 243 | format!("list: {formatted_url} failed over {protocol}: {error}").as_str(), |
| 245 | )?; | 244 | )?; |
| 246 | failed_protocols.push(protocol); | 245 | failed_protocols.push(protocol); |
| 247 | if protocol == &ServerProtocol::Ssh | ||
| 248 | && fetch_or_list_error_is_not_authentication_failure(&error) | ||
| 249 | { | ||
| 250 | // authenticated by failed to complete request | ||
| 251 | break; | ||
| 252 | } | ||
| 253 | } | 246 | } |
| 254 | } | 247 | } |
| 255 | } | 248 | } |