From 3598a05b98852baeb324bdaa00cb69035157f636 Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Thu, 19 Jun 2025 15:54:26 +0100 Subject: rename ngit-relay to grasp includes a change to a git config itme name --- src/bin/git_remote_nostr/push.rs | 2 +- src/bin/ngit/cli.rs | 2 +- src/bin/ngit/sub_commands/init.rs | 14 +++++++------- 3 files changed, 9 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/bin/git_remote_nostr/push.rs b/src/bin/git_remote_nostr/push.rs index 434dae9..9e54ca7 100644 --- a/src/bin/git_remote_nostr/push.rs +++ b/src/bin/git_remote_nostr/push.rs @@ -789,7 +789,7 @@ fn create_rejected_refspecs_and_remotes_refspecs( // ancestor of nostr and we are force pushing anyway... refspecs_for_remote.push(refspec.clone()); } else if is_ngit_relay { - // an ngit-relay can only be pushed to via nostr so can force push + // a grasp server can only be pushed to via nostr so can force push refspecs_for_remote.push(ensure_force_push_refspec(refspec)); } else { rejected_refspecs diff --git a/src/bin/ngit/cli.rs b/src/bin/ngit/cli.rs index ce4e12e..843c904 100644 --- a/src/bin/ngit/cli.rs +++ b/src/bin/ngit/cli.rs @@ -42,7 +42,7 @@ ngit settings are managed through the git config. Currently the only settings not reachable through standard commands relate to default hardcoded relays: - - nostr.ngit-relay-default-set - only used during `ngit init` + - nostr.grasp-default-set - only used during `ngit init` - nostr.relay-default-set - must have at least 1 value, all events send to repo relays, user write and default relays - nostr.relay-blaster-set - only used for repo announcement events - nostr.relay-signer-fallback-set diff --git a/src/bin/ngit/sub_commands/init.rs b/src/bin/ngit/sub_commands/init.rs index cd94a5a..7e095a3 100644 --- a/src/bin/ngit/sub_commands/init.rs +++ b/src/bin/ngit/sub_commands/init.rs @@ -253,7 +253,7 @@ pub async fn launch(cli_args: &Cli, args: &SubCommandArgs) -> Result<()> { }; let fallback_ngit_relays = - if let Ok(Some(s)) = git_repo.get_git_config_item("nostr.ngit-relay-default-set", None) { + if let Ok(Some(s)) = git_repo.get_git_config_item("nostr.grasp-default-set", None) { s.split(';') .filter_map(|url| normalize_ngit_relay_url(url).ok()) // Attempt to parse and filter out errors .collect() @@ -282,13 +282,13 @@ pub async fn launch(cli_args: &Cli, args: &SubCommandArgs) -> Result<()> { } } let selected = multi_select_with_custom_value( - "ngit-relays (ideally use between 2-4)", - "ngit-relay", + "grasp servers (ideally use between 2-4)", + "grasp server", options, selections, normalize_ngit_relay_url, )?; - show_multi_input_prompt_success("ngit-relays", &selected); + show_multi_input_prompt_success("grasp servers", &selected); selected }; @@ -357,7 +357,7 @@ pub async fn launch(cli_args: &Cli, args: &SubCommandArgs) -> Result<()> { .with_default(true), )? { - // TODO check if ngit-relays in use and if so turn this off: + // TODO check if grasp servers in use and if so turn this off: if git_repo .get_git_config_item("nostr.nostate", Some(true)) .unwrap_or(None) @@ -387,7 +387,7 @@ pub async fn launch(cli_args: &Cli, args: &SubCommandArgs) -> Result<()> { let selected = loop { let selections: Vec = vec![true; additional_server_options.len()]; let selected = multi_select_with_custom_value( - "additional git server(s) on top of ngit-relays", + "additional git server(s) on top of grasp servers", "git server remote url", additional_server_options, selections, @@ -787,7 +787,7 @@ pub async fn launch(cli_args: &Cli, args: &SubCommandArgs) -> Result<()> { } else { let countdown_start = 5; println!( - "waiting {countdown_start}s for ngit-relay servers to create your repo before we push your data" + "waiting {countdown_start}s for grasp servers to create your repo before we push your data" ); let term = Term::stdout(); for i in (1..=countdown_start).rev() { -- cgit v1.2.3