diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2024-07-19 21:20:53 +0100 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2024-07-19 21:20:53 +0100 |
| commit | 8531328558c7f5870be3571f63a952743eb0b9e6 (patch) | |
| tree | f72b57d2a6e571181d21a55fb03aca70d899cec3 /src/sub_commands/send.rs | |
| parent | fca1d193a46eba17255b5372adffac2396e48c04 (diff) | |
feat: integrate `fetch` into `push`
as part of a project to use `fetch` and the stored cache everywhere
Diffstat (limited to 'src/sub_commands/send.rs')
| -rw-r--r-- | src/sub_commands/send.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/sub_commands/send.rs b/src/sub_commands/send.rs index d093cb6..f94eed3 100644 --- a/src/sub_commands/send.rs +++ b/src/sub_commands/send.rs | |||
| @@ -53,7 +53,7 @@ pub struct SubCommandArgs { | |||
| 53 | } | 53 | } |
| 54 | 54 | ||
| 55 | #[allow(clippy::too_many_lines)] | 55 | #[allow(clippy::too_many_lines)] |
| 56 | pub async fn launch(cli_args: &Cli, args: &SubCommandArgs) -> Result<()> { | 56 | pub async fn launch(cli_args: &Cli, args: &SubCommandArgs, no_fetch: bool) -> Result<()> { |
| 57 | let git_repo = Repo::discover().context("cannot find a git repository")?; | 57 | let git_repo = Repo::discover().context("cannot find a git repository")?; |
| 58 | let git_repo_path = git_repo.get_path()?; | 58 | let git_repo_path = git_repo.get_path()?; |
| 59 | 59 | ||
| @@ -68,7 +68,9 @@ pub async fn launch(cli_args: &Cli, args: &SubCommandArgs) -> Result<()> { | |||
| 68 | 68 | ||
| 69 | let repo_coordinates = get_repo_coordinates(&git_repo, &client).await?; | 69 | let repo_coordinates = get_repo_coordinates(&git_repo, &client).await?; |
| 70 | 70 | ||
| 71 | fetching_with_report(git_repo_path, &client, &repo_coordinates).await?; | 71 | if !no_fetch { |
| 72 | fetching_with_report(git_repo_path, &client, &repo_coordinates).await?; | ||
| 73 | } | ||
| 72 | 74 | ||
| 73 | let (root_proposal_id, mention_tags) = | 75 | let (root_proposal_id, mention_tags) = |
| 74 | get_root_proposal_id_and_mentions_from_in_reply_to(git_repo.get_path()?, &args.in_reply_to) | 76 | get_root_proposal_id_and_mentions_from_in_reply_to(git_repo.get_path()?, &args.in_reply_to) |