From d2d0eeb72912809a00f09fafdae4e827a34d0e26 Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Mon, 9 Sep 2024 07:36:47 +0100 Subject: feat(remote): push protocol selection / fallback enable override from nostr url clone url is filesystem use filesystem otherwise try ssh, then https authenticated unless clone url is http, then try ssh then http as we assume, we are on a local trusted network. --- src/bin/git_remote_nostr/fetch.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/bin/git_remote_nostr/fetch.rs') diff --git a/src/bin/git_remote_nostr/fetch.rs b/src/bin/git_remote_nostr/fetch.rs index c48da85..83b94b8 100644 --- a/src/bin/git_remote_nostr/fetch.rs +++ b/src/bin/git_remote_nostr/fetch.rs @@ -15,7 +15,7 @@ use ngit::{ }; use crate::utils::{ - error_is_not_authentication_failure, find_proposal_and_patches_by_branch_name, + fetch_or_list_error_is_not_authentication_failure, find_proposal_and_patches_by_branch_name, get_oids_from_fetch_batch, get_open_proposals, get_read_protocols_to_try, join_with_and, }; @@ -140,7 +140,9 @@ fn fetch_from_git_server( format!("fetch: {formatted_url} failed over {protocol}: {error}").as_str(), )?; failed_protocols.push(protocol); - if protocol == &ServerProtocol::Ssh && error_is_not_authentication_failure(&error) { + if protocol == &ServerProtocol::Ssh + && fetch_or_list_error_is_not_authentication_failure(&error) + { // authenticated by failed to complete request break; } -- cgit v1.2.3