upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/src/bin/git_remote_nostr/utils.rs
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2025-05-09 20:00:24 +0100
committerDanConwayDev <DanConwayDev@protonmail.com>2025-05-09 20:00:24 +0100
commit38969bbfadf2854f6acb1e515f8f388a01a018c2 (patch)
treee5d3758003559bb5f82a4ba6bd455ae18463646c /src/bin/git_remote_nostr/utils.rs
parent2e5e6a5c860b9bdbd8fa3a495b68a8478fbad4cc (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/utils.rs')
-rw-r--r--src/bin/git_remote_nostr/utils.rs10
1 files changed, 0 insertions, 10 deletions
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(
354 ) 354 )
355} 355}
356 356
357/// to understand whether to try over another protocol
358pub fn fetch_or_list_error_is_not_authentication_failure(error: &anyhow::Error) -> bool {
359 !error_might_be_authentication_related(error)
360}
361
362/// to understand whether to try over another protocol
363pub fn push_error_is_not_authentication_failure(error: &anyhow::Error) -> bool {
364 !error_might_be_authentication_related(error)
365}
366
367pub fn error_might_be_authentication_related(error: &anyhow::Error) -> bool { 357pub fn error_might_be_authentication_related(error: &anyhow::Error) -> bool {
368 let error_str = error.to_string(); 358 let error_str = error.to_string();
369 for s in [ 359 for s in [