From ad28bd8db1a6e953dce999eea85becda1d90beae Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Fri, 6 Sep 2024 13:07:29 +0100 Subject: fix(remote): `fetch` and `list` status copy so that it the filesystem url is shown --- src/lib/git/nostr_url.rs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/lib/git/nostr_url.rs') 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 { pub fn protocol(&self) -> ServerProtocol { self.protocol.clone() } + + pub fn short_name(&self) -> String { + let domain = self.domain(); + if domain.is_empty() { + self.original_string.to_string() + } else { + domain + } + } } fn replace_first_occurrence(s: &str, target: char, replacement: char) -> String { -- cgit v1.2.3