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/push.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/push.rs')
| -rw-r--r-- | src/bin/git_remote_nostr/push.rs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/bin/git_remote_nostr/push.rs b/src/bin/git_remote_nostr/push.rs index 0cb1107..4eae92f 100644 --- a/src/bin/git_remote_nostr/push.rs +++ b/src/bin/git_remote_nostr/push.rs | |||
| @@ -45,8 +45,7 @@ use crate::{ | |||
| 45 | utils::{ | 45 | utils::{ |
| 46 | Direction, find_proposal_and_patches_by_branch_name, get_all_proposals, | 46 | Direction, find_proposal_and_patches_by_branch_name, get_all_proposals, |
| 47 | get_remote_name_by_url, get_short_git_server_name, get_write_protocols_to_try, | 47 | get_remote_name_by_url, get_short_git_server_name, get_write_protocols_to_try, |
| 48 | join_with_and, push_error_is_not_authentication_failure, read_line, | 48 | join_with_and, read_line, set_protocol_preference, |
| 49 | set_protocol_preference, | ||
| 50 | }, | 49 | }, |
| 51 | }; | 50 | }; |
| 52 | 51 | ||
| @@ -430,9 +429,6 @@ fn push_to_remote( | |||
| 430 | format!("push: {formatted_url} failed over {protocol}: {error}").as_str(), | 429 | format!("push: {formatted_url} failed over {protocol}: {error}").as_str(), |
| 431 | )?; | 430 | )?; |
| 432 | failed_protocols.push(protocol); | 431 | failed_protocols.push(protocol); |
| 433 | if push_error_is_not_authentication_failure(&error) { | ||
| 434 | break; | ||
| 435 | } | ||
| 436 | } else { | 432 | } else { |
| 437 | success = true; | 433 | success = true; |
| 438 | if !failed_protocols.is_empty() { | 434 | if !failed_protocols.is_empty() { |