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/git_remote_nostr | |
| 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/git_remote_nostr')
| -rw-r--r-- | src/bin/git_remote_nostr/main.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/bin/git_remote_nostr/main.rs b/src/bin/git_remote_nostr/main.rs index daa924f..29731e2 100644 --- a/src/bin/git_remote_nostr/main.rs +++ b/src/bin/git_remote_nostr/main.rs | |||
| @@ -14,7 +14,11 @@ use std::{ | |||
| 14 | use anyhow::{Context, Result, bail}; | 14 | use anyhow::{Context, Result, bail}; |
| 15 | use client::{Connect, consolidate_fetch_reports, get_repo_ref_from_cache}; | 15 | use client::{Connect, consolidate_fetch_reports, get_repo_ref_from_cache}; |
| 16 | use git::{RepoActions, nostr_url::NostrUrlDecoded}; | 16 | use git::{RepoActions, nostr_url::NostrUrlDecoded}; |
| 17 | use ngit::{client, git, login::existing::load_existing_login}; | 17 | use ngit::{ |
| 18 | client::{self, Params}, | ||
| 19 | git, | ||
| 20 | login::existing::load_existing_login, | ||
| 21 | }; | ||
| 18 | use nostr::nips::nip19::Nip19Coordinate; | 22 | use nostr::nips::nip19::Nip19Coordinate; |
| 19 | use utils::read_line; | 23 | use utils::read_line; |
| 20 | 24 | ||
| @@ -33,7 +37,7 @@ async fn main() -> Result<()> { | |||
| 33 | 37 | ||
| 34 | let git_repo_path = git_repo.get_path()?; | 38 | let git_repo_path = git_repo.get_path()?; |
| 35 | 39 | ||
| 36 | let mut client = Client::default(); | 40 | let mut client = Client::new(Params::with_git_config_relay_defaults(&Some(&git_repo))); |
| 37 | 41 | ||
| 38 | if let Ok((signer, _, _)) = load_existing_login( | 42 | if let Ok((signer, _, _)) = load_existing_login( |
| 39 | &Some(&git_repo), | 43 | &Some(&git_repo), |