upleb.uk

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

summaryrefslogtreecommitdiff
path: root/src/lib/git
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2024-09-06 13:07:29 +0100
committerDanConwayDev <DanConwayDev@protonmail.com>2024-09-06 14:06:03 +0100
commitad28bd8db1a6e953dce999eea85becda1d90beae (patch)
treefbd5241102bb1a06f6157afe0cd3781f46db2b27 /src/lib/git
parent0b9ebd63be13ee403c415d4a29538b94f9e7cffe (diff)
fix(remote): `fetch` and `list` status copy
so that it the filesystem url is shown
Diffstat (limited to 'src/lib/git')
-rw-r--r--src/lib/git/nostr_url.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/lib/git/nostr_url.rs b/src/lib/git/nostr_url.rs
index 2717916..d0e6d8a 100644
--- a/src/lib/git/nostr_url.rs
+++ b/src/lib/git/nostr_url.rs
@@ -324,6 +324,15 @@ impl CloneUrl {
324 pub fn protocol(&self) -> ServerProtocol { 324 pub fn protocol(&self) -> ServerProtocol {
325 self.protocol.clone() 325 self.protocol.clone()
326 } 326 }
327
328 pub fn short_name(&self) -> String {
329 let domain = self.domain();
330 if domain.is_empty() {
331 self.original_string.to_string()
332 } else {
333 domain
334 }
335 }
327} 336}
328 337
329fn replace_first_occurrence(s: &str, target: char, replacement: char) -> String { 338fn replace_first_occurrence(s: &str, target: char, replacement: char) -> String {