upleb.uk

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

summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2025-06-17 19:11:15 +0100
committerDanConwayDev <DanConwayDev@protonmail.com>2025-06-17 19:25:37 +0100
commite4dcbd7df2c1e16d49ccab68b364148deb2bca2f (patch)
tree4fd03aca050be82745c83596be4bfe79ba7d0f4b /src/bin
parent8b182325ad221e06f20b5778fd4963a4b90622c5 (diff)
fix: support `git://` in clone urls
based on jb55 trying to use this with damus nostr:event1qvzqqqqqqypzqvhpsfmr23gwhv795lgjc8uw0v44z3pe4sg2vlh08k0an3wx3cj9qy88wumn8ghj7mn0wvhxcmmv9uq3jamnwvaz7tmjv4kxz7fwwdhx7un59eek7cmfv9kz7qpqec3c59c4yu4yrsa9fedu27rnygnemj2cfmumf6fw7385wfthg57slj72ux
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/git_remote_nostr/utils.rs15
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,