From 8531328558c7f5870be3571f63a952743eb0b9e6 Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Fri, 19 Jul 2024 21:20:53 +0100 Subject: feat: integrate `fetch` into `push` as part of a project to use `fetch` and the stored cache everywhere --- src/sub_commands/send.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/sub_commands/send.rs') 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 { } #[allow(clippy::too_many_lines)] -pub async fn launch(cli_args: &Cli, args: &SubCommandArgs) -> Result<()> { +pub async fn launch(cli_args: &Cli, args: &SubCommandArgs, no_fetch: bool) -> Result<()> { let git_repo = Repo::discover().context("cannot find a git repository")?; let git_repo_path = git_repo.get_path()?; @@ -68,7 +68,9 @@ pub async fn launch(cli_args: &Cli, args: &SubCommandArgs) -> Result<()> { let repo_coordinates = get_repo_coordinates(&git_repo, &client).await?; - fetching_with_report(git_repo_path, &client, &repo_coordinates).await?; + if !no_fetch { + fetching_with_report(git_repo_path, &client, &repo_coordinates).await?; + } let (root_proposal_id, mention_tags) = get_root_proposal_id_and_mentions_from_in_reply_to(git_repo.get_path()?, &args.in_reply_to) -- cgit v1.2.3