diff options
Diffstat (limited to 'src/bin/ngit/sub_commands/init.rs')
| -rw-r--r-- | src/bin/ngit/sub_commands/init.rs | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/bin/ngit/sub_commands/init.rs b/src/bin/ngit/sub_commands/init.rs index f26eea3..4aa7ced 100644 --- a/src/bin/ngit/sub_commands/init.rs +++ b/src/bin/ngit/sub_commands/init.rs | |||
| @@ -596,9 +596,10 @@ fn ask_to_set_origin_remote(repo_ref: &RepoRef, git_repo: &Repo) -> Result<()> { | |||
| 596 | .with_default(true) | 596 | .with_default(true) |
| 597 | .with_prompt("set remote \"origin\" to the nostr url of your repository?"), | 597 | .with_prompt("set remote \"origin\" to the nostr url of your repository?"), |
| 598 | )? { | 598 | )? { |
| 599 | git_repo | 599 | git_repo.git_repo.remote_set_url( |
| 600 | .git_repo | 600 | "origin", |
| 601 | .remote_set_url("origin", &repo_ref.to_nostr_git_url(&Some(git_repo)))?; | 601 | &repo_ref.to_nostr_git_url(&Some(git_repo)).to_string(), |
| 602 | )?; | ||
| 602 | } | 603 | } |
| 603 | Ok(()) | 604 | Ok(()) |
| 604 | } | 605 | } |
| @@ -609,9 +610,10 @@ fn ask_to_create_new_origin_remote(repo_ref: &RepoRef, git_repo: &Repo) -> Resul | |||
| 609 | .with_default(true) | 610 | .with_default(true) |
| 610 | .with_prompt("set remote \"origin\" to the nostr url of your repository?"), | 611 | .with_prompt("set remote \"origin\" to the nostr url of your repository?"), |
| 611 | )? { | 612 | )? { |
| 612 | git_repo | 613 | git_repo.git_repo.remote( |
| 613 | .git_repo | 614 | "origin", |
| 614 | .remote("origin", &repo_ref.to_nostr_git_url(&Some(git_repo)))?; | 615 | &repo_ref.to_nostr_git_url(&Some(git_repo)).to_string(), |
| 616 | )?; | ||
| 615 | } | 617 | } |
| 616 | Ok(()) | 618 | Ok(()) |
| 617 | } | 619 | } |