From 5e7af60cb815ccdb071a2c905b3a56ddc6b1dff2 Mon Sep 17 00:00:00 2001 From: Jacob Pratt Date: Thu, 25 Nov 2021 02:46:09 -0500 Subject: [PATCH] Reduce build time --- src/main.rs | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/main.rs b/src/main.rs index b6ae9db6..e0245be2 100644 --- a/src/main.rs +++ b/src/main.rs @@ -454,6 +454,7 @@ fn up_to_release( repo: &Repository, reviewers: &Reviewers, mailmap: &Mailmap, + from: Option<&VersionTag>, to: &VersionTag, ) -> Result> { let to_commit = repo.find_commit(to.commit).map_err(|e| { @@ -468,8 +469,14 @@ fn up_to_release( })?; let modules = get_submodules(&repo, &to_commit)?; - let mut author_map = build_author_map(&repo, &reviewers, &mailmap, "", &to.raw_tag) - .map_err(|e| ErrorContext(format!("Up to {}", to), e))?; + let mut author_map = build_author_map( + &repo, + &reviewers, + &mailmap, + from.map(|from| from.raw_tag.as_str()).unwrap_or(""), + &to.raw_tag, + ) + .map_err(|e| ErrorContext(format!("Up to {}", to), e))?; for module in &modules { if let Ok(path) = update_repo(&module.repository) { @@ -553,11 +560,11 @@ fn generate_thanks() -> Result, Box v, - None => up_to_release(&repo, &reviewers, &mailmap, &previous)?, + None => up_to_release(&repo, &reviewers, &mailmap, None, &previous)?, }; let current = cache.get(&version).unwrap();