From 0ce73c3987b8adbc210e27415f37f7c3251835f8 Mon Sep 17 00:00:00 2001 From: Justin Worthe Date: Mon, 30 Mar 2020 11:07:24 +0200 Subject: Rearranged checks so that the expensive reproducing merge commit happens after rebase check --- src/policies.rs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/policies.rs b/src/policies.rs index fb10aed..cc2b71e 100644 --- a/src/policies.rs +++ b/src/policies.rs @@ -79,14 +79,9 @@ pub fn verify_git_commits( })?; } - if config.verify_commit_signatures { + if config.verify_rebased { policy_result = policy_result.and_then(|| { - verify_commit_signatures::( - git, - &gpg, - ¬_manually_verified_commits, - &mut keyring, - ) + verify_rebased::(&all_commits, git, &ref_update, &config.override_tag_pattern) })?; } @@ -95,9 +90,14 @@ pub fn verify_git_commits( .and_then(|| verify_different_authors::(&all_commits, git, &ref_update))?; } - if config.verify_rebased { + if config.verify_commit_signatures { policy_result = policy_result.and_then(|| { - verify_rebased::(&all_commits, git, &ref_update, &config.override_tag_pattern) + verify_commit_signatures::( + git, + &gpg, + ¬_manually_verified_commits, + &mut keyring, + ) })?; } } -- cgit v1.2.3