From 38969bbfadf2854f6acb1e515f8f388a01a018c2 Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Fri, 9 May 2025 20:00:24 +0100 Subject: 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 --- src/bin/git_remote_nostr/utils.rs | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'src/bin/git_remote_nostr/utils.rs') diff --git a/src/bin/git_remote_nostr/utils.rs b/src/bin/git_remote_nostr/utils.rs index 5048ce2..3a9f07d 100644 --- a/src/bin/git_remote_nostr/utils.rs +++ b/src/bin/git_remote_nostr/utils.rs @@ -354,16 +354,6 @@ pub fn set_protocol_preference( ) } -/// to understand whether to try over another protocol -pub fn fetch_or_list_error_is_not_authentication_failure(error: &anyhow::Error) -> bool { - !error_might_be_authentication_related(error) -} - -/// to understand whether to try over another protocol -pub fn push_error_is_not_authentication_failure(error: &anyhow::Error) -> bool { - !error_might_be_authentication_related(error) -} - pub fn error_might_be_authentication_related(error: &anyhow::Error) -> bool { let error_str = error.to_string(); for s in [ -- cgit v1.2.3