From 7ccb251ea99e7a3f396754302eb0f836a1b5a608 Mon Sep 17 00:00:00 2001
From: DanConwayDev <DanConwayDev@protonmail.com>
Date: Thu, 28 Nov 2024 17:08:22 +0000
Subject: [PATCH] fix(init): dont default git_server to nostr url

if nostr added as origin remote before repo announcement sent
---
 src/bin/ngit/sub_commands/init.rs | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/bin/ngit/sub_commands/init.rs b/src/bin/ngit/sub_commands/init.rs
index 2817506..32af619 100644
--- a/src/bin/ngit/sub_commands/init.rs
+++ b/src/bin/ngit/sub_commands/init.rs
@@ -287,6 +287,9 @@ pub async fn launch(cli_args: &Cli, args: &SubCommandArgs) -> Result<()> {
                     } else if let Ok(url) = git_repo.get_origin_url() {
                         if let Ok(fetch_url) = convert_clone_url_to_https(&url) {
                             fetch_url
+                        } else if url.starts_with("nostr://") {
+                            // nostr added as origin remote before repo announcement sent
+                            String::new()
                         } else {
                             // local repo or custom protocol
                             url