diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2025-05-21 12:32:41 +0100 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2025-05-21 16:21:29 +0100 |
| commit | d64748b810bf64638a5eb71eac054d91dae0c0f1 (patch) | |
| tree | 784412c5f0a7b701cb63d40d2fbaf84694a333d2 /src/bin/ngit/sub_commands/send.rs | |
| parent | 7abd469db87388463187c3a5a9d5b3fe73ffee06 (diff) | |
feat: add support for default relay overrides
via git config so they can be overwritten locally and globally
Diffstat (limited to 'src/bin/ngit/sub_commands/send.rs')
| -rw-r--r-- | src/bin/ngit/sub_commands/send.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/bin/ngit/sub_commands/send.rs b/src/bin/ngit/sub_commands/send.rs index 9fc00d9..5a5acc8 100644 --- a/src/bin/ngit/sub_commands/send.rs +++ b/src/bin/ngit/sub_commands/send.rs | |||
| @@ -2,7 +2,10 @@ use std::path::Path; | |||
| 2 | 2 | ||
| 3 | use anyhow::{Context, Result, bail}; | 3 | use anyhow::{Context, Result, bail}; |
| 4 | use console::Style; | 4 | use console::Style; |
| 5 | use ngit::{client::send_events, git_events::generate_cover_letter_and_patch_events}; | 5 | use ngit::{ |
| 6 | client::{Params, send_events}, | ||
| 7 | git_events::generate_cover_letter_and_patch_events, | ||
| 8 | }; | ||
| 6 | use nostr::{ | 9 | use nostr::{ |
| 7 | ToBech32, | 10 | ToBech32, |
| 8 | nips::{nip10::Marker, nip19::Nip19Event}, | 11 | nips::{nip10::Marker, nip19::Nip19Event}, |
| @@ -52,7 +55,7 @@ pub async fn launch(cli_args: &Cli, args: &SubCommandArgs, no_fetch: bool) -> Re | |||
| 52 | .get_main_or_master_branch() | 55 | .get_main_or_master_branch() |
| 53 | .context("the default branches (main or master) do not exist")?; | 56 | .context("the default branches (main or master) do not exist")?; |
| 54 | 57 | ||
| 55 | let mut client = Client::default(); | 58 | let mut client = Client::new(Params::with_git_config_relay_defaults(&Some(&git_repo))); |
| 56 | 59 | ||
| 57 | let repo_coordinates = get_repo_coordinates_when_remote_unknown(&git_repo, &client).await?; | 60 | let repo_coordinates = get_repo_coordinates_when_remote_unknown(&git_repo, &client).await?; |
| 58 | 61 | ||