diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2024-12-10 12:12:14 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2024-12-10 12:12:14 +0000 |
| commit | 36eb9395567dc0022b1700ec9cda1389baf22476 (patch) | |
| tree | b5ed71fc7431faacfa29690739db2fe77a0cdc7d /src/bin/ngit/sub_commands/init.rs | |
| parent | 8d8c21d05e4d8d7af30a96704a5919efc07010dc (diff) | |
fix(nostr_url): use nip05 in nostr url if cached
prioritise using nip05 nostr url format when the nip05, public key
mapping is stored in the (usually local) git config.
Diffstat (limited to 'src/bin/ngit/sub_commands/init.rs')
| -rw-r--r-- | src/bin/ngit/sub_commands/init.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bin/ngit/sub_commands/init.rs b/src/bin/ngit/sub_commands/init.rs index c9c8873..86b681c 100644 --- a/src/bin/ngit/sub_commands/init.rs +++ b/src/bin/ngit/sub_commands/init.rs | |||
| @@ -522,7 +522,7 @@ async fn prompt_to_set_nostr_url_as_origin(repo_ref: &RepoRef, git_repo: &Repo) | |||
| 522 | } | 522 | } |
| 523 | } | 523 | } |
| 524 | println!("contributors can clone your repository by installing ngit and using this clone url:"); | 524 | println!("contributors can clone your repository by installing ngit and using this clone url:"); |
| 525 | println!("{}", repo_ref.to_nostr_git_url()); | 525 | println!("{}", repo_ref.to_nostr_git_url(&Some(git_repo))); |
| 526 | 526 | ||
| 527 | Ok(()) | 527 | Ok(()) |
| 528 | } | 528 | } |
| @@ -535,7 +535,7 @@ fn ask_to_set_origin_remote(repo_ref: &RepoRef, git_repo: &Repo) -> Result<()> { | |||
| 535 | )? { | 535 | )? { |
| 536 | git_repo | 536 | git_repo |
| 537 | .git_repo | 537 | .git_repo |
| 538 | .remote_set_url("origin", &repo_ref.to_nostr_git_url())?; | 538 | .remote_set_url("origin", &repo_ref.to_nostr_git_url(&Some(git_repo)))?; |
| 539 | } | 539 | } |
| 540 | Ok(()) | 540 | Ok(()) |
| 541 | } | 541 | } |
| @@ -548,7 +548,7 @@ fn ask_to_create_new_origin_remote(repo_ref: &RepoRef, git_repo: &Repo) -> Resul | |||
| 548 | )? { | 548 | )? { |
| 549 | git_repo | 549 | git_repo |
| 550 | .git_repo | 550 | .git_repo |
| 551 | .remote("origin", &repo_ref.to_nostr_git_url())?; | 551 | .remote("origin", &repo_ref.to_nostr_git_url(&Some(git_repo)))?; |
| 552 | } | 552 | } |
| 553 | Ok(()) | 553 | Ok(()) |
| 554 | } | 554 | } |