upleb.uk

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

summaryrefslogtreecommitdiff
path: root/src/bin/ngit/sub_commands
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2025-06-19 15:54:26 +0100
committerDanConwayDev <DanConwayDev@protonmail.com>2025-06-19 15:54:26 +0100
commit3598a05b98852baeb324bdaa00cb69035157f636 (patch)
tree1d1e27bcd5d7454a8286c60a1e6f98fd4c2b4e9c /src/bin/ngit/sub_commands
parentf05d32838e212fcb506d6b211137e9dc2457786c (diff)
rename ngit-relay to grasp
includes a change to a git config itme name
Diffstat (limited to 'src/bin/ngit/sub_commands')
-rw-r--r--src/bin/ngit/sub_commands/init.rs14
1 files changed, 7 insertions, 7 deletions
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<()> {
253 }; 253 };
254 254
255 let fallback_ngit_relays = 255 let fallback_ngit_relays =
256 if let Ok(Some(s)) = git_repo.get_git_config_item("nostr.ngit-relay-default-set", None) { 256 if let Ok(Some(s)) = git_repo.get_git_config_item("nostr.grasp-default-set", None) {
257 s.split(';') 257 s.split(';')
258 .filter_map(|url| normalize_ngit_relay_url(url).ok()) // Attempt to parse and filter out errors 258 .filter_map(|url| normalize_ngit_relay_url(url).ok()) // Attempt to parse and filter out errors
259 .collect() 259 .collect()
@@ -282,13 +282,13 @@ pub async fn launch(cli_args: &Cli, args: &SubCommandArgs) -> Result<()> {
282 } 282 }
283 } 283 }
284 let selected = multi_select_with_custom_value( 284 let selected = multi_select_with_custom_value(
285 "ngit-relays (ideally use between 2-4)", 285 "grasp servers (ideally use between 2-4)",
286 "ngit-relay", 286 "grasp server",
287 options, 287 options,
288 selections, 288 selections,
289 normalize_ngit_relay_url, 289 normalize_ngit_relay_url,
290 )?; 290 )?;
291 show_multi_input_prompt_success("ngit-relays", &selected); 291 show_multi_input_prompt_success("grasp servers", &selected);
292 selected 292 selected
293 }; 293 };
294 294
@@ -357,7 +357,7 @@ pub async fn launch(cli_args: &Cli, args: &SubCommandArgs) -> Result<()> {
357 .with_default(true), 357 .with_default(true),
358 )? 358 )?
359 { 359 {
360 // TODO check if ngit-relays in use and if so turn this off: 360 // TODO check if grasp servers in use and if so turn this off:
361 if git_repo 361 if git_repo
362 .get_git_config_item("nostr.nostate", Some(true)) 362 .get_git_config_item("nostr.nostate", Some(true))
363 .unwrap_or(None) 363 .unwrap_or(None)
@@ -387,7 +387,7 @@ pub async fn launch(cli_args: &Cli, args: &SubCommandArgs) -> Result<()> {
387 let selected = loop { 387 let selected = loop {
388 let selections: Vec<bool> = vec![true; additional_server_options.len()]; 388 let selections: Vec<bool> = vec![true; additional_server_options.len()];
389 let selected = multi_select_with_custom_value( 389 let selected = multi_select_with_custom_value(
390 "additional git server(s) on top of ngit-relays", 390 "additional git server(s) on top of grasp servers",
391 "git server remote url", 391 "git server remote url",
392 additional_server_options, 392 additional_server_options,
393 selections, 393 selections,
@@ -787,7 +787,7 @@ pub async fn launch(cli_args: &Cli, args: &SubCommandArgs) -> Result<()> {
787 } else { 787 } else {
788 let countdown_start = 5; 788 let countdown_start = 5;
789 println!( 789 println!(
790 "waiting {countdown_start}s for ngit-relay servers to create your repo before we push your data" 790 "waiting {countdown_start}s for grasp servers to create your repo before we push your data"
791 ); 791 );
792 let term = Term::stdout(); 792 let term = Term::stdout();
793 for i in (1..=countdown_start).rev() { 793 for i in (1..=countdown_start).rev() {