diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/git_remote_helper.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/git_remote_helper.rs b/src/git_remote_helper.rs index f8a9db4..2fa1aad 100644 --- a/src/git_remote_helper.rs +++ b/src/git_remote_helper.rs | |||
| @@ -156,7 +156,7 @@ fn nostr_git_url_to_repo_coordinates(url: &str) -> Result<HashSet<Coordinate>> { | |||
| 156 | 156 | ||
| 157 | if let Some(domain) = url.domain() { | 157 | if let Some(domain) = url.domain() { |
| 158 | if let Ok(public_key) = PublicKey::parse(domain) { | 158 | if let Ok(public_key) = PublicKey::parse(domain) { |
| 159 | if url.path().is_empty() { | 159 | if url.path().len() < 2 { |
| 160 | bail!( | 160 | bail!( |
| 161 | "nostr git url should include the repo identifier eg nostr://npub123/the-repo-identifer" | 161 | "nostr git url should include the repo identifier eg nostr://npub123/the-repo-identifer" |
| 162 | ); | 162 | ); |
| @@ -176,7 +176,7 @@ fn nostr_git_url_to_repo_coordinates(url: &str) -> Result<HashSet<Coordinate>> { | |||
| 176 | } | 176 | } |
| 177 | } | 177 | } |
| 178 | repo_coordinattes.insert(Coordinate { | 178 | repo_coordinattes.insert(Coordinate { |
| 179 | identifier: "ngit".to_string(), | 179 | identifier: url.path()[1..].to_string(), |
| 180 | public_key, | 180 | public_key, |
| 181 | kind: nostr_sdk::Kind::GitRepoAnnouncement, | 181 | kind: nostr_sdk::Kind::GitRepoAnnouncement, |
| 182 | relays, | 182 | relays, |