diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2025-07-25 21:02:26 +0100 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2025-07-25 22:17:23 +0100 |
| commit | 513fce723c7e37aa353844303f36022517f2db43 (patch) | |
| tree | 05e16bdd4789036af04b6c046823396f9f0faf22 /src/bin/git_remote_nostr/push.rs | |
| parent | e89dbc142f5a0a517f197562f5f228681d9aed47 (diff) | |
refactor: move `utils` and `list` helpers to lib
to enable forthcoming `ngit sync` cmd
Diffstat (limited to 'src/bin/git_remote_nostr/push.rs')
| -rw-r--r-- | src/bin/git_remote_nostr/push.rs | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/bin/git_remote_nostr/push.rs b/src/bin/git_remote_nostr/push.rs index 909a0ab..74e98f9 100644 --- a/src/bin/git_remote_nostr/push.rs +++ b/src/bin/git_remote_nostr/push.rs | |||
| @@ -25,9 +25,15 @@ use ngit::{ | |||
| 25 | oid_to_shorthand_string, | 25 | oid_to_shorthand_string, |
| 26 | }, | 26 | }, |
| 27 | git_events::{self, KIND_PULL_REQUEST, event_to_cover_letter, get_event_root}, | 27 | git_events::{self, KIND_PULL_REQUEST, event_to_cover_letter, get_event_root}, |
| 28 | list::list_from_remotes, | ||
| 28 | login::{self, user::UserRef}, | 29 | login::{self, user::UserRef}, |
| 29 | repo_ref::{self, get_repo_config_from_yaml, is_grasp_server, normalize_grasp_server_url}, | 30 | repo_ref::{self, get_repo_config_from_yaml, is_grasp_server, normalize_grasp_server_url}, |
| 30 | repo_state, | 31 | repo_state, |
| 32 | utils::{ | ||
| 33 | Direction, find_proposal_and_patches_by_branch_name, get_all_proposals, | ||
| 34 | get_remote_name_by_url, get_short_git_server_name, get_write_protocols_to_try, | ||
| 35 | join_with_and, read_line, set_protocol_preference, | ||
| 36 | }, | ||
| 31 | }; | 37 | }; |
| 32 | use nostr::{event::UnsignedEvent, nips::nip10::Marker}; | 38 | use nostr::{event::UnsignedEvent, nips::nip10::Marker}; |
| 33 | use nostr_sdk::{ | 39 | use nostr_sdk::{ |
| @@ -37,16 +43,7 @@ use nostr_sdk::{ | |||
| 37 | use repo_ref::RepoRef; | 43 | use repo_ref::RepoRef; |
| 38 | use repo_state::RepoState; | 44 | use repo_state::RepoState; |
| 39 | 45 | ||
| 40 | use crate::{ | 46 | use crate::{client::Client, git::Repo}; |
| 41 | client::Client, | ||
| 42 | git::Repo, | ||
| 43 | list::list_from_remotes, | ||
| 44 | utils::{ | ||
| 45 | Direction, find_proposal_and_patches_by_branch_name, get_all_proposals, | ||
| 46 | get_remote_name_by_url, get_short_git_server_name, get_write_protocols_to_try, | ||
| 47 | join_with_and, read_line, set_protocol_preference, | ||
| 48 | }, | ||
| 49 | }; | ||
| 50 | 47 | ||
| 51 | #[allow(clippy::too_many_lines)] | 48 | #[allow(clippy::too_many_lines)] |
| 52 | #[allow(clippy::type_complexity)] | 49 | #[allow(clippy::type_complexity)] |