diff options
Diffstat (limited to 'src/bin/ngit/sub_commands/push.rs')
| -rw-r--r-- | src/bin/ngit/sub_commands/push.rs | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/bin/ngit/sub_commands/push.rs b/src/bin/ngit/sub_commands/push.rs index a77f356..aaf1009 100644 --- a/src/bin/ngit/sub_commands/push.rs +++ b/src/bin/ngit/sub_commands/push.rs | |||
| @@ -6,7 +6,7 @@ use ngit::{ | |||
| 6 | use nostr_sdk::PublicKey; | 6 | use nostr_sdk::PublicKey; |
| 7 | 7 | ||
| 8 | use crate::{ | 8 | use crate::{ |
| 9 | cli::Cli, | 9 | cli::{extract_signer_cli_arguments, Cli}, |
| 10 | client::{ | 10 | client::{ |
| 11 | fetching_with_report, get_all_proposal_patch_events_from_cache, | 11 | fetching_with_report, get_all_proposal_patch_events_from_cache, |
| 12 | get_proposals_and_revisions_from_cache, get_repo_ref_from_cache, Client, Connect, | 12 | get_proposals_and_revisions_from_cache, get_repo_ref_from_cache, Client, Connect, |
| @@ -53,7 +53,7 @@ pub async fn launch(cli_args: &Cli, args: &SubCommandArgs) -> Result<()> { | |||
| 53 | 53 | ||
| 54 | fetching_with_report(git_repo_path, &client, &repo_coordinates).await?; | 54 | fetching_with_report(git_repo_path, &client, &repo_coordinates).await?; |
| 55 | 55 | ||
| 56 | let repo_ref = get_repo_ref_from_cache(git_repo_path, &repo_coordinates).await?; | 56 | let repo_ref = get_repo_ref_from_cache(Some(git_repo_path), &repo_coordinates).await?; |
| 57 | 57 | ||
| 58 | let logged_in_public_key = | 58 | let logged_in_public_key = |
| 59 | if let Ok(Some(npub)) = git_repo.get_git_config_item("nostr.npub", None) { | 59 | if let Ok(Some(npub)) = git_repo.get_git_config_item("nostr.npub", None) { |
| @@ -166,15 +166,11 @@ pub async fn launch(cli_args: &Cli, args: &SubCommandArgs) -> Result<()> { | |||
| 166 | ahead.len() | 166 | ahead.len() |
| 167 | ); | 167 | ); |
| 168 | 168 | ||
| 169 | let (signer, user_ref) = login::launch( | 169 | let (signer, user_ref, _) = login::login_or_signup( |
| 170 | &git_repo, | 170 | &Some(&git_repo), |
| 171 | &cli_args.bunker_uri, | 171 | &extract_signer_cli_arguments(cli_args).unwrap_or(None), |
| 172 | &cli_args.bunker_app_key, | ||
| 173 | &cli_args.nsec, | ||
| 174 | &cli_args.password, | 172 | &cli_args.password, |
| 175 | Some(&client), | 173 | Some(&client), |
| 176 | false, | ||
| 177 | false, | ||
| 178 | ) | 174 | ) |
| 179 | .await?; | 175 | .await?; |
| 180 | 176 | ||
| @@ -204,7 +200,7 @@ pub async fn launch(cli_args: &Cli, args: &SubCommandArgs) -> Result<()> { | |||
| 204 | 200 | ||
| 205 | send_events( | 201 | send_events( |
| 206 | &client, | 202 | &client, |
| 207 | git_repo_path, | 203 | Some(git_repo_path), |
| 208 | patch_events, | 204 | patch_events, |
| 209 | user_ref.relays.write(), | 205 | user_ref.relays.write(), |
| 210 | repo_ref.relays.clone(), | 206 | repo_ref.relays.clone(), |