diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2024-09-11 15:51:10 +0100 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2024-09-12 07:20:44 +0100 |
| commit | c7faf80ab9d2639211d3978f1527286b3ce86ce0 (patch) | |
| tree | f79cb9aceb925206d6fa6fc05268d3873a4ab4f5 /src | |
| parent | df1660b1b78b5881c64c6fadd4ae12c8c01c6684 (diff) | |
fix(remote): update copy
to make it more like native git
Diffstat (limited to 'src')
| -rw-r--r-- | src/bin/git_remote_nostr/fetch.rs | 6 | ||||
| -rw-r--r-- | src/bin/git_remote_nostr/list.rs | 6 | ||||
| -rw-r--r-- | src/bin/git_remote_nostr/push.rs | 6 | ||||
| -rw-r--r-- | src/lib/git/nostr_url.rs | 6 |
4 files changed, 6 insertions, 18 deletions
diff --git a/src/bin/git_remote_nostr/fetch.rs b/src/bin/git_remote_nostr/fetch.rs index 83b94b8..baf56ed 100644 --- a/src/bin/git_remote_nostr/fetch.rs +++ b/src/bin/git_remote_nostr/fetch.rs | |||
| @@ -121,11 +121,7 @@ fn fetch_from_git_server( | |||
| 121 | let mut success = false; | 121 | let mut success = false; |
| 122 | for protocol in &protocols_to_attempt { | 122 | for protocol in &protocols_to_attempt { |
| 123 | term.write_line( | 123 | term.write_line( |
| 124 | format!( | 124 | format!("fetching {} over {protocol}...", server_url.short_name(),).as_str(), |
| 125 | "fetching over {protocol} from {}...", | ||
| 126 | server_url.short_name(), | ||
| 127 | ) | ||
| 128 | .as_str(), | ||
| 129 | )?; | 125 | )?; |
| 130 | 126 | ||
| 131 | let formatted_url = server_url.format_as(protocol, &decoded_nostr_url.user)?; | 127 | let formatted_url = server_url.format_as(protocol, &decoded_nostr_url.user)?; |
diff --git a/src/bin/git_remote_nostr/list.rs b/src/bin/git_remote_nostr/list.rs index c8843e3..d3682ec 100644 --- a/src/bin/git_remote_nostr/list.rs +++ b/src/bin/git_remote_nostr/list.rs | |||
| @@ -164,11 +164,7 @@ pub fn list_from_remote( | |||
| 164 | 164 | ||
| 165 | for protocol in &protocols_to_attempt { | 165 | for protocol in &protocols_to_attempt { |
| 166 | term.write_line( | 166 | term.write_line( |
| 167 | format!( | 167 | format!("fetching {} ref list over {protocol}...", server_url.short_name(),).as_str(), |
| 168 | "fetching ref list over {protocol} from {}...", | ||
| 169 | server_url.short_name(), | ||
| 170 | ) | ||
| 171 | .as_str(), | ||
| 172 | )?; | 168 | )?; |
| 173 | 169 | ||
| 174 | let formatted_url = server_url.format_as(protocol, &decoded_nostr_url.user)?; | 170 | let formatted_url = server_url.format_as(protocol, &decoded_nostr_url.user)?; |
diff --git a/src/bin/git_remote_nostr/push.rs b/src/bin/git_remote_nostr/push.rs index 364555a..7f63eb0 100644 --- a/src/bin/git_remote_nostr/push.rs +++ b/src/bin/git_remote_nostr/push.rs | |||
| @@ -355,11 +355,7 @@ fn push_to_remote( | |||
| 355 | 355 | ||
| 356 | for protocol in &protocols_to_attempt { | 356 | for protocol in &protocols_to_attempt { |
| 357 | term.write_line( | 357 | term.write_line( |
| 358 | format!( | 358 | format!("fetching {} ref list over {protocol}...", server_url.short_name(),).as_str(), |
| 359 | "fetching ref list over {protocol} from {}...", | ||
| 360 | server_url.short_name(), | ||
| 361 | ) | ||
| 362 | .as_str(), | ||
| 363 | )?; | 359 | )?; |
| 364 | 360 | ||
| 365 | let formatted_url = server_url.format_as(protocol, &decoded_nostr_url.user)?; | 361 | let formatted_url = server_url.format_as(protocol, &decoded_nostr_url.user)?; |
diff --git a/src/lib/git/nostr_url.rs b/src/lib/git/nostr_url.rs index d0e6d8a..6fcc11d 100644 --- a/src/lib/git/nostr_url.rs +++ b/src/lib/git/nostr_url.rs | |||
| @@ -28,8 +28,8 @@ impl fmt::Display for ServerProtocol { | |||
| 28 | ServerProtocol::Git => write!(f, "git"), | 28 | ServerProtocol::Git => write!(f, "git"), |
| 29 | ServerProtocol::Filesystem => write!(f, "filesystem"), | 29 | ServerProtocol::Filesystem => write!(f, "filesystem"), |
| 30 | ServerProtocol::Unspecified => write!(f, "unsepcified"), | 30 | ServerProtocol::Unspecified => write!(f, "unsepcified"), |
| 31 | ServerProtocol::UnauthHttps => write!(f, "unauthenticated https"), | 31 | ServerProtocol::UnauthHttps => write!(f, "https (unauthenticated)"), |
| 32 | ServerProtocol::UnauthHttp => write!(f, "unauthenticated http"), | 32 | ServerProtocol::UnauthHttp => write!(f, "http (unauthenticated)"), |
| 33 | } | 33 | } |
| 34 | } | 34 | } |
| 35 | } | 35 | } |
| @@ -330,7 +330,7 @@ impl CloneUrl { | |||
| 330 | if domain.is_empty() { | 330 | if domain.is_empty() { |
| 331 | self.original_string.to_string() | 331 | self.original_string.to_string() |
| 332 | } else { | 332 | } else { |
| 333 | domain | 333 | format!("{domain}{}", self.path) |
| 334 | } | 334 | } |
| 335 | } | 335 | } |
| 336 | } | 336 | } |