diff options
Diffstat (limited to 'src/bin/git_remote_nostr/utils.rs')
| -rw-r--r-- | src/bin/git_remote_nostr/utils.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/bin/git_remote_nostr/utils.rs b/src/bin/git_remote_nostr/utils.rs index 2c77baa..ec6412b 100644 --- a/src/bin/git_remote_nostr/utils.rs +++ b/src/bin/git_remote_nostr/utils.rs | |||
| @@ -238,6 +238,14 @@ pub fn get_read_protocols_to_try( | |||
| 238 | ] | 238 | ] |
| 239 | } else if server_url.protocol() == ServerProtocol::Ftp { | 239 | } else if server_url.protocol() == ServerProtocol::Ftp { |
| 240 | vec![ServerProtocol::Ftp, ServerProtocol::Ssh] | 240 | vec![ServerProtocol::Ftp, ServerProtocol::Ssh] |
| 241 | } else if server_url.protocol() == ServerProtocol::Git { | ||
| 242 | vec![ | ||
| 243 | ServerProtocol::Git, | ||
| 244 | ServerProtocol::UnauthHttps, | ||
| 245 | ServerProtocol::Ssh, | ||
| 246 | // note: list and fetch stop here if ssh was authenticated | ||
| 247 | ServerProtocol::Https, | ||
| 248 | ] | ||
| 241 | } else { | 249 | } else { |
| 242 | vec![ | 250 | vec![ |
| 243 | ServerProtocol::UnauthHttps, | 251 | ServerProtocol::UnauthHttps, |
| @@ -282,6 +290,13 @@ pub fn get_write_protocols_to_try( | |||
| 282 | ] | 290 | ] |
| 283 | } else if server_url.protocol() == ServerProtocol::Ftp { | 291 | } else if server_url.protocol() == ServerProtocol::Ftp { |
| 284 | vec![ServerProtocol::Ssh, ServerProtocol::Ftp] | 292 | vec![ServerProtocol::Ssh, ServerProtocol::Ftp] |
| 293 | } else if server_url.protocol() == ServerProtocol::Git { | ||
| 294 | vec![ | ||
| 295 | ServerProtocol::Ssh, | ||
| 296 | ServerProtocol::Git, | ||
| 297 | // note: list and fetch stop here if ssh was authenticated | ||
| 298 | ServerProtocol::Https, | ||
| 299 | ] | ||
| 285 | } else { | 300 | } else { |
| 286 | vec![ | 301 | vec![ |
| 287 | ServerProtocol::Ssh, | 302 | ServerProtocol::Ssh, |