From e00f712fb09d2a55fbfd36696f3725bc44c140f5 Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Wed, 4 Dec 2024 15:36:17 +0000 Subject: fix: `ngit` load correct repo address git-remote-nostr is always called with a nostr remote that specifies a single repository coordinate whereas `ngit` commands need to discover this. this change moves from getting this value from the following places in priority order: 1. git config item `nostr.repo` 2. first nostr remote discovered 2. maintainers.yaml 3. prompt the user to: 1. nostr remote - if multiple, prompt the user to select 2. git config item `nostr.repo` 3. maintainers.yaml - removing the legacy format 4. prompt the user - now with support for nostr remote format --- src/bin/ngit/sub_commands/send.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/bin/ngit/sub_commands/send.rs') diff --git a/src/bin/ngit/sub_commands/send.rs b/src/bin/ngit/sub_commands/send.rs index 6c9d8eb..bc4d18a 100644 --- a/src/bin/ngit/sub_commands/send.rs +++ b/src/bin/ngit/sub_commands/send.rs @@ -20,7 +20,7 @@ use crate::{ git::{identify_ahead_behind, Repo, RepoActions}, git_events::{event_is_patch_set_root, event_tag_from_nip19_or_hex}, login, - repo_ref::get_repo_coordinates, + repo_ref::get_repo_coordinates_when_remote_unknown, }; #[derive(Debug, clap::Args)] @@ -54,7 +54,7 @@ pub async fn launch(cli_args: &Cli, args: &SubCommandArgs, no_fetch: bool) -> Re let mut client = Client::default(); - let repo_coordinates = get_repo_coordinates(&git_repo, &client).await?; + let repo_coordinates = get_repo_coordinates_when_remote_unknown(&git_repo).await?; if !no_fetch { fetching_with_report(git_repo_path, &client, &repo_coordinates).await?; -- cgit v1.2.3