diff options
Diffstat (limited to 'src/bin/git_remote_nostr/push.rs')
| -rw-r--r-- | src/bin/git_remote_nostr/push.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/bin/git_remote_nostr/push.rs b/src/bin/git_remote_nostr/push.rs index daa7973..de18828 100644 --- a/src/bin/git_remote_nostr/push.rs +++ b/src/bin/git_remote_nostr/push.rs | |||
| @@ -41,7 +41,7 @@ use crate::{ | |||
| 41 | utils::{ | 41 | utils::{ |
| 42 | find_proposal_and_patches_by_branch_name, get_all_proposals, get_remote_name_by_url, | 42 | find_proposal_and_patches_by_branch_name, get_all_proposals, get_remote_name_by_url, |
| 43 | get_short_git_server_name, get_write_protocols_to_try, join_with_and, | 43 | get_short_git_server_name, get_write_protocols_to_try, join_with_and, |
| 44 | push_error_is_not_authentication_failure, read_line, | 44 | push_error_is_not_authentication_failure, read_line, set_protocol_preference, Direction, |
| 45 | }, | 45 | }, |
| 46 | }; | 46 | }; |
| 47 | 47 | ||
| @@ -351,7 +351,7 @@ fn push_to_remote( | |||
| 351 | term: &Term, | 351 | term: &Term, |
| 352 | ) -> Result<()> { | 352 | ) -> Result<()> { |
| 353 | let server_url = git_server_url.parse::<CloneUrl>()?; | 353 | let server_url = git_server_url.parse::<CloneUrl>()?; |
| 354 | let protocols_to_attempt = get_write_protocols_to_try(&server_url, decoded_nostr_url); | 354 | let protocols_to_attempt = get_write_protocols_to_try(git_repo, &server_url, decoded_nostr_url); |
| 355 | 355 | ||
| 356 | let mut failed_protocols = vec![]; | 356 | let mut failed_protocols = vec![]; |
| 357 | let mut success = false; | 357 | let mut success = false; |
| @@ -373,6 +373,7 @@ fn push_to_remote( | |||
| 373 | success = true; | 373 | success = true; |
| 374 | if !failed_protocols.is_empty() { | 374 | if !failed_protocols.is_empty() { |
| 375 | term.write_line(format!("fetch: succeeded over {protocol}").as_str())?; | 375 | term.write_line(format!("fetch: succeeded over {protocol}").as_str())?; |
| 376 | let _ = set_protocol_preference(git_repo, protocol, &server_url, &Direction::Push); | ||
| 376 | } | 377 | } |
| 377 | } | 378 | } |
| 378 | term.clear_last_lines(1)?; | 379 | term.clear_last_lines(1)?; |